Getting started with Web Kubectl

Table of contents
Reading Time: 3 minutes

Hello Readers! In this blog we are going to see all about web kubectl. What it is and What’s the use case of web kubectl. So, As its name suggests it is use for running the kubectl command in a web browser. With the help of this you can also manage your kubernetes credentials. One of the main benefits is that the user doesn’t need to install kubectl in their local machine. 

web kubectl

So, Let’s get started!
For getting started playing with web kubectl, we need to install web kubectl. Following is the official repo for web kubectl:

We are going to run web kubectl using docker. So, let’s run the command:

$ docker run --name="webkubectl" -p 8080:8080 -d --privileged kubeoperator/webkubectl
Run Web Kubectl

Now, my web kubectl is running on my localhost:8080. Below is the initial dashboard for web kubectl:


Let’s play with it! So, there are two ways by which we can connect to our cluster. They are following:

  • By using your cluster kube config
  • By using your cluster bearer token

Firstly we will see how we can connect to our kubernetes cluster using kube config. So for this we need to upload our kube config file. Click on the New Session button. Select the kube config radio button. Give the name of your session. It can be anything according to you. Click on upload and upload your kube config file here.

create session

Click save. Your session is now created. 


Click on connect for running kubectl command. After clicking, a browser will open in a new tab where you can run your kubectl command in a web browser.

web kubectl

Now, let’s see how to use bearer token to connect to run kubectl in a web browser. For this again click on the New session button. Give them your session name, api server and paste their cluster bearer token.

create session

I have a gke cluster so, i have given all the details of that cluster. Now click on save. My new session will get create. Click on Connect to connect to your cluster.

So, It will open a new browser where you can run the kubectl command and get the details of your kubernetes cluster.

running commands

So, This is how we can use web kubectl for running kubectl in your web browser.


Thank you for sticking to the end. Therefore In this blog we came to know about how to get started with web kubectl. We have seen two ways by which we can connect to our kubernetes cluster. So, If you like this blog, please do show your appreciation by giving thumbs ups and share this blog and give me suggestions on how I can improve my future posts to suit your needs.


Written by 

Naincy Kumari is a DevOps Consultant at Knoldus Inc. She is always ready to learn new technologies and tools. She loves painting and dancing.