Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minikube starts without IP address assigned #851

Closed
uladzimir-shelhunou opened this issue Nov 24, 2016 · 9 comments
Closed

minikube starts without IP address assigned #851

uladzimir-shelhunou opened this issue Nov 24, 2016 · 9 comments
Labels
co/hyperv HyperV related issues kind/bug Categorizes issue or PR as related to a bug. os/windows

Comments

@uladzimir-shelhunou
Copy link

uladzimir-shelhunou commented Nov 24, 2016

BUG REPORT

Minikube version (use minikube version):

v0.12.2

Environment:

  • OS: Windows 10 Enterprise
  • VM Driver: Hyper-V
  • Docker version: Docker for Windows 1.12.3
  • Install tools: no
  • Others: no

What happened:

IP is not allocated during start, log:

minikube start --vm-driver hyperv --alsologtostderr --logtostderr --show-libmachine-logs
W1124 21:18:31.807474 3708 root.go:134] Error reading config file at C:\Users\user.minikube\config\config.json: open C:\Users\user.minikube\config\config.json: The system cannot find the file specified.
I1124 21:18:31.808471 3708 notify.go:111] Checking for updates...
Starting local Kubernetes cluster...
Running pre-create checks...
Creating machine...
(minikube) Downloading C:\Users\user.minikube\cache\boot2docker.iso from file://C:/Users/user/.minikube/cache/iso/minikube-0.7.iso...
(minikube) Creating SSH key...
(minikube) Creating VM...
(minikube) Using switch "DockerNAT"
(minikube) Creating VHD
(minikube) Starting VM...
(minikube) Waiting for host to start...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...

This machine has been allocated an IP address, but Docker Machine could not
reach it successfully.

SSH for the machine should still work, but connecting to exposed ports, such as
the Docker daemon port (usually :2376), may not work properly.

You may need to add the route manually, or use another related workaround.

This could be due to a VPN, proxy, or host file configuration issue.

You also might want to clear any VirtualBox host only interfaces you are not using.
Checking connection to Docker...
Docker is up and running!
I1124 21:20:20.890915 3708 cluster.go:273] Setting up certificates for IP: %s fe80::215:5dff:fe54:b506
I1124 21:20:22.581394 3708 cluster.go:210] sudo killall localkube || true
I1124 21:20:24.257048 3708 cluster.go:212] killall: localkube: no process killed

I1124 21:20:24.257048 3708 cluster.go:210]
Run with nohup so it stays up. Redirect logs to useful places.
sudo sh -c 'PATH=/usr/local/sbin:$PATH nohup /usr/local/bin/localkube
--generate-certs=false --logtostderr=true --enable-dns=false --node-ip=fe80::215:5dff:fe54:b506 > /var/lib/localkube/localkube.out 2> /var/lib/localkube/localkube.err < /dev/null & echo $! > /var/run/localkube.pid &'

I1124 21:20:25.941340 3708 cluster.go:212]
I1124 21:20:27.576377 3708 start.go:166] Using kubeconfig: C:\Users\user/.kube/config
Kubectl is now configured to use the cluster.

What you expected to happen:

minikube is started with IP address allocated

How to reproduce it (as minimally and precisely as possible):

Install minikube 0.12.2 and start it

@r2d4 r2d4 added co/hyperv HyperV related issues kind/bug Categorizes issue or PR as related to a bug. os/windows labels Nov 24, 2016
@uladzimir-shelhunou
Copy link
Author

Also, when I run minikube dashboard I see this in logs:

minikube dashboard --alsologtostderr --logtostderr --show-libmachine-logs --url
W1124 23:36:20.259544 14960 root.go:134] Error reading config file at C:\Users\user.minikube\config\config.json: open C:\Users\user.minikube\config\config.json: The system cannot find the file specified.
I1124 23:36:20.260547 14960 notify.go:111] Checking for updates...
Could not find finalized endpoint being pointed to by kubernetes-dashboard: Temporary Error: Get https://[fe80::215:5dff:fe54:b507]:8443/api/v1/namespaces/kube-system/endpoints/kubernetes-dashboard: dial tcp [fe80::215:5dff:fe54:b507]:8443: connectex: No connection could be made because the target machine actively refused it.

@uladzimir-shelhunou
Copy link
Author

@r2d4, Is there any workaround for my issue?

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Nov 25, 2016

@VVSH The issue is that minikube is attempting to use the DockerNat Virtual Switch which will not be properly configured for minikube (it is used by Docker For Windows). You need to create another virtual switch with internet access and specify minikube to use that via the --hyperv-virtual-switch flag. For steps on how to do this, see the following:
#754 (comment)

@uladzimir-shelhunou
Copy link
Author

@aaron-prindle, thanks! Will it be fixed?

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Nov 26, 2016

@VVSH To resolve this, you will need to create a new Virtual Switch and configure Minikube to use it via the --hypev-virtual-switch flag. Here are the steps for how to configure a Virtual Switch for Minikube:

  1. Create an Virtual Switch in Hyper-V with the Connect Type set to "Internal network"; I named mine Minikube.
  2. In Network Connections select your actual internet connect (Ethernet for me); right click > Properties.
  3. On the Sharing tab tick "Allow other network users to connect through ..." and then select the virtual switch you created in step 1 ("vEthernet (Minikube)" in my case).
  4. Delete any existing Minikube VMs in Hyper-v and delete the .minikube folder in your home folder.
  5. Run (as an administrator) minikube start --vm-driver=hyperv --hyperv-virtual-switch=Minikube

Please let me know if you have any issues creating the Virtual Switch and configuring Minikube to use it.

@uladzimir-shelhunou
Copy link
Author

uladzimir-shelhunou commented Nov 26, 2016

@aaron-prindle, I did it, everything works fine, thanks.

I meant will it be fixed in the next releases, or we have to create a switch manually on each dev environment?

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Nov 26, 2016

@VVSH Sorry, I did not realize what you meant initially. I will create an issue regarding having Minikue automatically make a virtual switch if the hyperv driver is specified (so that it is similar to Docker For Windows) and work on it. Thank you for this suggestion!

@uladzimir-shelhunou
Copy link
Author

@aaron-prindle, thanks!

Actually, my concern is that I usually connect to the internet in different ways, so I need to share the internet connection each time.

@Yannovitch
Copy link

I tried that and it didn't work for me. I can't make minikube work on windows. Can you provide any help ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/hyperv HyperV related issues kind/bug Categorizes issue or PR as related to a bug. os/windows
Projects
None yet
Development

No branches or pull requests

4 participants