top of page

Install Kubectl on Windows

  • Writer: Subhasish Sahu
    Subhasish Sahu
  • Nov 18, 2021
  • 1 min read


Keep it under program files and add the binary into your PATH by editing the environment variable


ree

K8s CheatSheet


1) Check that kubectl is properly configured by getting the cluster state:


ree

2) If kubectl cluster-info returns the URL response but you can't access your cluster, to check whether it is configured properly use:

ree

3) Ensure the version of the kubectl client

ree

4) Bring up the minikube dashboard

ree

5) Create a sample deployment and expose it on port 8080:


kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4

kubectl expose deployment hello-minikube --type=NodePort --port=8080



ree

ree

ree

6) To see if the services are up or not

command: kubectl get services hello-minikube

ree

7) To access this service is to let minikube launch a web browser for you

command : minikube service hello-minikube


ree

Browser:

ree

8) Forward deployment/service to the port:

command: kubectl port-forward service/hello-minikube 7080:8080

ree
ree

9) To pause the cluster

ree

The Dashboard will stop now and you cannot bring it up. If you bring it up, you will the below error

ree

10) Browse the catalog of easily installed Kubernetes services


ree

11) Increase the default memory limit (requires a restart)

ree

12) Halt the cluster


ree

13) Start the cluster

ree

14) Create a second cluster running an older Kubernetes release

command : minikube start -p aged --kubernetes-version=v1.16.1


It cant be created on windows

ree

15) Delete all of the minikube clusters

ree

If you are not able to launch minikube due to the above deletion, the start minikube first

command: minikube start


ree

Then run command: minikube dashboard


ree
ree

Comments


bottom of page