Reputation: 3715
I have installed docker desktop on my windows 10 and have enabled Kubernetes. When I run the kubectl config current-context
command I am getting this response gke_k8s-demo-263903_asia-south1-a_kubia
. How do I set up the context to point to docker-desktop
? I remember that I had worked with GKE earlier but not sure how to reset the context.
Upvotes: 6
Views: 13984
Reputation: 6239
If you don't have any docker-desktop
kubernetes context at all, you need likely to create it for the first time or otherwise to reset it; see: https://docs.docker.com/desktop/kubernetes/#turn-on-kubernetes
Summary:
Upvotes: 4
Reputation: 32857
One additional note: If you have accidentally deleted the docker-desktop
context from your ~/.kube/config
you can re-create it when restarting the docker/Kubernetes Engine in the Docker-Desktop application.
Upvotes: 5
Reputation: 466
From your local machine run, you should see docker-desktop listed:
kubectl config get-contexts
Then run the below:
kubectl config use-context docker-desktop
If the cluster name you want to communicate with is not listed, it means you haven't got to context file to the cluster.
Upvotes: 31