Port Forwarding Hub

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    How to Port Forward on Starlink and Bypass CGNAT

    February 1, 2023

    How to Port Forward on T-Mobile and Bypass CGNAT

    January 13, 2023

    How to Port Forward Virgin Telco and Bypass CGNAT in Spain

    December 16, 2022
    Facebook Twitter Instagram
    Trending
    • How to Port Forward on Starlink and Bypass CGNAT
    • How to Port Forward on T-Mobile and Bypass CGNAT
    • How to Port Forward Virgin Telco and Bypass CGNAT in Spain
    • How to Port Forward Orange and Bypass CGNAT in Spain
    • How to Port Forward Jazztel and Bypass CGNAT in Spain
    • How to Port Forward Pepephone and Bypass CGNAT in Spain
    • How to Port Forward Yoigo and Bypass CGNAT in Spain
    • How to Port Forward Lowi and Bypass CGNAT in Spain
    Facebook Twitter Instagram YouTube
    Port Forwarding Hub
    Subscribe
    Thursday, May 25
    • Home
    • Tools
      • Port Checker
    • News
    • About Us
    • Contact
    Port Forwarding Hub
    Home»Info»Kubectl Port Forwarding: Have It Set Up In A Few Simple Steps
    Info

    Kubectl Port Forwarding: Have It Set Up In A Few Simple Steps

    Jamil AzizBy Jamil AzizNovember 18, 2020Updated:January 15, 2021No Comments2 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Kubectl Port Forwarding
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Kubectl Port Forwarding: Have It Set Up In A Few Simple Steps

    Kubectl is the primary command-line tool that manages the Kubernetes clusters. It is useful in administering cluster resources, deploying apps, and building complex frameworks. The port forwarding process for Kubectl requires direct and recurrent input from the user. This is because once the pod instance fails, the connection terminates, requiring the establishment of a new forward by manually entering the same command. We give you a step by step guide on how to set up Kubectl port forwarding.

    Things You’ll Need Beforehand

    In order to successfully port forward Kubectl, you need the following beforehand:

    • Kubernetes cluster
    • The Kubectl command-line tool
    • Install Redis-cli software

    Redis Installation

    To start with, you will need to install Redis by following these steps:

    • Create a deployment that runs Redis. The deployment helps in defining the pod to be used. The output of a successful command will verify the creation of a deployment. View the pod status to check whether it is ready. 
    • Check the deployment created on output displays.

    The deployment manages the ReplicaSet automatically. To view the status of the ReplicaSet, use: kubectl get ReplicaSet. The output will also display the ReplicaSet.

    • Create a Service to expose Redis on the network and check the output for the display of the service created.
    • Verify that the Redis server is running in the pod and listen on the port. The output will display the TCP port allocated to the Redis on the internet.

    How To Port Forward Kubectl

    While port forwarding may be an intensive process, it may be the only way to access internal clusters; hence, a necessary process. To port forward Kubectl, you will use several Kubernetes command line on your machine and proceed as follows:

    • Use a resource name to select a matching port to forward the port. If the name of the pod is redis-master 766d459796 and the port number is 6379, your command will be:

    “kubectl port-forward pods/redis-master-766d459796-258hz 7000:6379”

    In the above case, the Kubernetes API listens on local port 7000 and forwards data to port 6370 on the defined pod.

    • Start the Redis command line interface redis-cli –p 7000
    • Enter the ‘’ping’’ command at the Redis command line prompt. A successful ping request will return ‘’PONG’’.
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Jamil Aziz

    Related Posts

    How to Configure Port Forwarding in IPtables

    July 28, 2022

    How to Setup Port Forwarding for Remote Desktop

    July 15, 2022

    How to Port Forward for Helium Hotspot in Your Router?

    May 20, 2022

    What is Port Forwarding & How To Port Forward Your Router?

    July 2, 2021
    Add A Comment

    Leave A Reply Cancel Reply

    Categories
    • Games
    • Guides
    • Info
    • News
    • Routers
    • Walkthroughs
    Search
    featured

    How to Port Forward The King of Fighters XV on your router

    February 2, 2022
    Advertisement
    Port Forwarding Hub
    Facebook Twitter Instagram
    • Home
    • Routers
    • Games
    • Software
    • Guides
    • Walkthroughs
    • About Us
    © 2023 All Rights Reserved Port Forwarding Hub.

    Type above and press Enter to search. Press Esc to cancel.