I'm using minikube version: v0.11.0.
What happened:
minikube start --vm-driver hyperv reports a success but kubectl can't connect afterwards. Checking the minikube VM in the HyperV shows that the docker daemon isn't running any container even after minikube start reported a success.
Running minikube docker-env gives:
SET DOCKER_HOST=tcp://fe80::215:5dff:fe00:a903:2376
But the VM IP address is:
fe80::215:5dff:fe00:a903 (see how the port gets confused as being part of the IP address)
What you expected to happen:
The minikube docker-env command should report:
SET DOCKER_HOST=tcp://[fe80::215:5dff:fe00:a903]:2376
I assume this caused in turn failure to run the docker containers.
Does minikube logs show anything? Docker env should be unrelated to whether kubernetes starts in the VM & whether it starts any containers.
Regardless, I've fixed the docker env output in #705.
@jimmidyson Thanks. I encountered the issue on my home PC which means I won't be able to run minikube logs until I get back home tonight.
I'll keep you posted then.
@jimmidyson : As promised, here are the logs !
==> /var/lib/localkube/localkube.err <==
I1018 01:34:45.724850 3032 server.go:203] Using iptables Proxier.
W1018 01:34:45.725185 3032 server.go:417] Failed to retrieve node info: Get http://127.0.0.1:8080/api/v1/nodes/minikube: dial tcp 127.0.0.1:8080: getsockopt: connection refused
W1018 01:34:45.725237 3032 proxier.go:226] invalid nodeIP, initialize kube-proxy with 127.0.0.1 as nodeIP
I1018 01:34:45.725251 3032 server.go:215] Tearing down userspace rules.
panic: Unable to select an IP.
goroutine 1 [running]:
panic(0x3052920, 0xc4206efea0)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
k8s.io/minikube/cmd/localkube/cmd.SetupServer(0xc420402b40)
/var/lib/jenkins/go2/src/k8s.io/minikube/_gopath/src/k8s.io/minikube/cmd/localkube/cmd/start.go:112 +0x7f0
k8s.io/minikube/cmd/localkube/cmd.StartLocalkube()
/var/lib/jenkins/go2/src/k8s.io/minikube/_gopath/src/k8s.io/minikube/cmd/localkube/cmd/start.go:48 +0x94
k8s.io/minikube/cmd/localkube/cmd.glob..func1(0x522ec00, 0xc42075f9b0, 0x0, 0x3)
/var/lib/jenkins/go2/src/k8s.io/minikube/_gopath/src/k8s.io/minikube/cmd/localkube/cmd/root.go:31 +0x14
k8s.io/minikube/vendor/github.com/spf13/cobra.(*Command).execute(0x522ec00, 0xc42000c190, 0x3, 0x3, 0x522ec00, 0xc42000c190)
/var/lib/jenkins/go2/src/k8s.io/minikube/_gopath/src/k8s.io/minikube/vendor/github.com/spf13/cobra/command.go:603 +0x439
k8s.io/minikube/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x522ec00, 0x4, 0x3716866, 0x2e)
/var/lib/jenkins/go2/src/k8s.io/minikube/_gopath/src/k8s.io/minikube/vendor/github.com/spf13/cobra/command.go:689 +0x367
k8s.io/minikube/vendor/github.com/spf13/cobra.(*Command).Execute(0x522ec00, 0x0, 0x0)
/var/lib/jenkins/go2/src/k8s.io/minikube/_gopath/src/k8s.io/minikube/vendor/github.com/spf13/cobra/command.go:648 +0x2b
main.main()
/var/lib/jenkins/go2/src/k8s.io/minikube/cmd/localkube/main.go:32 +0x5f
==> /var/lib/localkube/localkube.out <==
Setting the docker config manually to point correctly on the VM gives:
C:\Users\User>docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
That is, an empty list of running containers.
Hi, I'm facing the same issue. Any ideas how to fix?
I'm having the same issue.
minikube version: v0.12.2
Microsoft Windows [Version 10.0.14393]
Hyper-V 10.0.14393.351
/var/lib/localkube/localkube.err
F1103 09:25:54.522303 3171 genericapiserver.go:625] Unable to find a suitable network address.error='Unable to select an IP.' . Try to set the AdvertiseAddress directly or provide a valid BindAddress to fix this.
minikube docker-env
SET DOCKER_TLS_VERIFY=1
SET DOCKER_HOST=tcp://[fe80::215:5dff:fe50:3503]:2376
SET DOCKER_CERT_PATH=C:\Users\james.bench\.minikube\certs
SET DOCKER_API_VERSION=1.23
REM Run this command to configure your shell:
REM @FOR /f "tokens=*" %i IN ('minikube docker-env') DO @%i
Same issue here.
This was for me caused by minikube defaulting to my first hyperv virtual switch, which is an internal Docker for Windows switch. By adding a new external switch specific to minukube I was able to get everything going. It would be great if this would be documented as right now minikube doesn't "Just Work" alas.
You can easily confirm you have the same issue by trying ping 8.8.8.8 from within the VM. It will probably show that you have a link local (not sure of the IPv6 terminology) IPv6 IP. Alas this is a bit tricky with minikube as minikube ssh doesn't work either out of the box. Instead you either need to start the Git Bash terminal (which has a ssh command on it's path), or, easier, just click "connect..." in the sidebar after clicking on the VM in question in Hyper-V Manager.
Last really stupid thing... it sucks that hyper-v is called hyperv inside minikube vmdriver selection... I was ripping my hair out first time I tried running minikube. Just defaulting to hyper-v would alleviate this one though.
This should be fixed now.
Most helpful comment
Hi, I'm facing the same issue. Any ideas how to fix?