How to fix issue of 'Unable to connect to the server: EOF' Kubernetes - Kubectl
I also had this issue. Be sure to check your config file that is generated by minikube
. This file can most likely be found ~/.kube/config
. Make sure that you are referencing the right cluster name in the current context you are using. You can see what context you are currently using by: kubectl get current-context
. The important thing is that you understand why you are getting this error and as @Suresh Vishnoi stated, kubectl
doesn't know about k8s
api-server.
After Minikube is started, kubectl is configured automatically.
minikube start
Starting local Kubernetes cluster...
Kubernetes is available at https://192.168.99.100:8443.
Kubectl is now configured to use the cluster.
You can verify and validate the cluster and context with following commands.
kubectl config view