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



K8s CheatSheet


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



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


3) Ensure the version of the kubectl client


4) Bring up the minikube dashboard

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






6) To see if the services are up or not

command: kubectl get services hello-minikube


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

command : minikube service hello-minikube


Browser:

8) Forward deployment/service to the port:

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


9) To pause the cluster

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

10) Browse the catalog of easily installed Kubernetes services


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

12) Halt the cluster


13) Start the cluster

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


15) Delete all of the minikube clusters


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

command: minikube start



Then run command: minikube dashboard



댓글


bottom of page