Closed toby-griffiths closed 6 years ago
I've also upgraded to v0.25.0 this morning, using brew cask upgrade
but am still getting the same error.
I have this too
me too
Anyone from the project team able to help with this?
+1
+1
+1
So I faced the same problem and got through it.
So first update kubectl. If you installed it with brew:
brew upgrade kubectl
Otherwise, check the kubectl installation docs here: https://kubernetes.io/docs/tasks/tools/install-kubectl
Then make sure you are targeting your minikube:
kubectl config use-context minikube
If that still fails, stop and delete minikube and re-install by downloading the release from the GitHub release page:
For anyone finding this and still having problem, the new Docker for Mac Edge version includes Kubernetes, and works great.
To debug this we'll need the output of "minikube logs" after a "minikube delete" and "minikube start".
I'm no longer using Minikube, as Docker for Mac (Edge) includes Kubernetes, so I'm afraid I can't provide this info any longer.
Happy to close the issue, if you like.
Same problem here, the minikube stops being accsible after a while. Minikube status indicates that it is still running.
Same here. Clean install, Linux, --vm-driver=none
root@xxxxxx:~# kubectl cluster-info
Kubernetes master is running at https://10.xx.xx.xx:8443
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
The connection to the server 10.xx.xx.xx:8443 was refused - did you specify the right host or port?
root@xxxxxx:~# minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 10.xx.xx.xx
root@xxxxxx:~# minikube version
minikube version: v0.28.1
Same problem on Ubuntu 16.04 running in AWS:
sudo minikube --vm-driver=none start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E0911 21:59:10.273616 2035 start.go:300] Error starting cluster: kubeadm init error
sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI &&
sudo /usr/bin/kubeadm alpha phase addon kube-dns
running command: : running command:
sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI &&
sudo /usr/bin/kubeadm alpha phase addon kube-dns
output: [init] Using Kubernetes version: v1.10.0
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
[WARNING SystemVerification]: docker version is greater than the most recently validated version. Docker version: 18.03.1-ce. Max validated version: 17.03
[WARNING Hostname]: hostname "minikube" could not be reached
[WARNING Hostname]: hostname "minikube" lookup minikube on 10.0.0.2:53: no such host
[WARNING Port-10250]: Port 10250 is in use
[WARNING FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml]: /etc/kubernetes/manifests/kube-apiserver.yaml already exists
[WARNING FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml]: /etc/kubernetes/manifests/kube-controller-manager.yaml already exists
[WARNING FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml]: /etc/kubernetes/manifests/kube-scheduler.yaml already exists
[WARNING FileAvailable--etc-kubernetes-manifests-etcd.yaml]: /etc/kubernetes/manifests/etcd.yaml already exists
[WARNING FileExisting-ebtables]: ebtables not found in system path
[WARNING FileExisting-crictl]: crictl not found in system path
Suggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl
Flag --admission-control has been deprecated, Use --enable-admission-plugins or --disable-admission-plugins instead. Will be removed in a future version.
[WARNING DirAvailable--data-minikube]: /data/minikube is not empty
[certificates] Using the existing ca certificate and key.
[certificates] Using the existing apiserver certificate and key.
[certificates] Using the existing apiserver-kubelet-client certificate and key.
[certificates] Using the existing etcd/ca certificate and key.
[certificates] Using the existing etcd/server certificate and key.
[certificates] Using the existing etcd/peer certificate and key.
[certificates] Using the existing etcd/healthcheck-client certificate and key.
[certificates] Using the existing apiserver-etcd-client certificate and key.
[certificates] Using the existing sa key.
[certificates] Using the existing front-proxy-ca certificate and key.
[certificates] Using the existing front-proxy-client certificate and key.
[certificates] Valid certificates and keys now exist in "/var/lib/localkube/certs/"
[kubeconfig] Using existing up-to-date KubeConfig file: "/etc/kubernetes/admin.conf"
[kubeconfig] Using existing up-to-date KubeConfig file: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Using existing up-to-date KubeConfig file: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Using existing up-to-date KubeConfig file: "/etc/kubernetes/scheduler.conf"
[controlplane] Wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[controlplane] Wrote Static Pod manifest for component kube-controller-manager to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[controlplane] Wrote Static Pod manifest for component kube-scheduler to "/etc/kubernetes/manifests/kube-scheduler.yaml"
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests".
[init] This might take a minute or longer if the control plane images have to be pulled.
[apiclient] All control plane components are healthy after 4.568168 seconds
[uploadconfig] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
error uploading configuration: unable to create configmap: Post https://localhost:8443/api/v1/namespaces/kube-system/configmaps: dial tcp 127.0.0.1:8443: getsockopt: connection refused
: running command:
sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI &&
sudo /usr/bin/kubeadm alpha phase addon kube-dns
.: exit status 1
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:
minikube config set WantReportErrorPrompt false
================================================================================
Occurs unpredictably, maybe once every three attempts.
One interesting message to me is:
"Failed to start node healthz on 0:"
This bug is probably obsolete now, but what does "minikube ssh" do in this environment?
I am getting this error when I am trying to start minikube in MAC.
EXIMR-IM-806:~ anuj.kp$ minikube start Starting local Kubernetes v1.10.0 cluster... Starting VM... Getting VM IP address... Moving files into cluster... Setting up certs... Connecting to cluster... Setting up kubeconfig... Starting cluster components... Kubectl is now configured to use the cluster. Loading cached images from config file. EXIMR-IM-806:~ anuj.kp$ kubectl get nodes The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?
I encountered the same issue on macOS high Sierra - 10.13.6
Working solution for me was: -> minikube stop -> kubectl config use-context minikube -> minikube start
Those three steps resoved the issue getting: The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?
Closing open localkube issues, as localkube was long deprecated and removed from the last two minikube releases. I hope you were able to find another solution that worked out for you - if not, please open a new PR.
Thanks @thomascraig
Solved my problem
try running the commands "minikube stop" followed by "minikube start"
I am facing same issue but using kubeadm. How to solve?
I appreciate that there are already tickets opened for this issue, but I couldn't see one open for v0.24.1, so please accept my apologies if this is considered a duplicate…
Is this a BUG REPORT or FEATURE REQUEST? (choose one): Bug report
Please provide the following details:
Environment:
Minikube version (use
minikube version
):minikube version: v0.24.1
macOS 10.12.6
cat ~/.minikube/machines/minikube/config.json | grep DriverName
):virtualbox
cat ~/.minikube/machines/minikube/config.json | grep -i ISO
orminikube ssh cat /etc/VERSION
):minikube-v0.23.6.iso
None
What happened: Running kubectl commands, such as
kubectl get pods
orkubectl get services
return the error…The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?
What you expected to happen: I expected to see the (empty) list of pods or services
How to reproduce it (as minimally and precisely as possible): Install minikube using brew (using
brew cask install minikube
), runminikube start
Output of
minikube logs
(if applicable):Anything else do we need to know:
I've also tried stopping, deleting, and removing the
~/.minikube/
directory without any luck.Copy of my kubectl config: