When I try any kubectl command, it always returns:
Unable to connect to the server: EOF
I followed these tutorials:
https://kubernetes.io/docs/tasks/tools/install-kubectl/
https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
But they have not helped me. According to the first link, by default, kubectl configuration is located at
~/.kube/config
But in that path I don't have anything. I don't know if this is causing the issue.
Other thing is when I try to check the kubectl configuration:
M:.kube candres$ kubectl cluster-info
Kubernetes master is running at http://localhost:8080
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: EOF
M:.kube candres$ kubectl cluster-info dump
Unable to connect to the server: EOF
The versions I have installed are:
Kubernetes - kubectl
M:.kube candres$ kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3", GitCommit:"X", GitTreeState:"clean", BuildDate:"2018-02-09T21:51:06Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"darwin/amd64"}
Unable to connect to the server: EOF
Minikube
M:.kube candres$ minikube version
minikube version: v0.25.0
Docker:
M:.kube candres$ docker version
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: X
Built: Wed Dec 27 20:03:51 2017
OS/Arch: darwin/amd64
Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: X
Built: Wed Dec 27 20:12:29 2017
OS/Arch: linux/amd64
Experimental: true
Does anyone know how to resolve this?
kubectl cluster-info
is working. However, others are not working. Could you please run following commandkubectl config view
which will list all of the clusters and contexts. – Suresh VishnoiM:.kube candres$ kubectl config view apiVersion: v1 clusters: [] contexts: [] current-context: "" kind: Config preferences: {} users: []
With regard about the port, I dont know why this use port 8080! – Carlos Andreskubeconfig
file automatically. So You can restart the minikube. You can runminikube status
to verify it. – Suresh Vishnoi