Minikube: Network created by minikube does not work

Created on 5 Sep 2016  路  9Comments  路  Source: kubernetes/minikube

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Minikube version

0.9.0

Environment

OS

Arch Linux

VM Driver

"DriverName": "virtualbox",
Installed from: https://aur.archlinux.org/packages/virtualbox-ext-oracle/

Docker version

Docker version 1.12.1, build 23cf638
Installed from: https://www.archlinux.org/packages/community/x86_64/docker/

What happened

minikube consistently does not work on my machine. minikube starts, but I can't communicate with the kubernetes cluster inside.

--- ~ 禄 minikube start
Starting local Kubernetes cluster...

E0905 16:03:12.333985    8963 start.go:87] Error starting host: Error creating. Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100:2376: getsockopt: connection refused
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.
. Retrying.
Kubectl is now configured to use the cluster.

Afterwards, I can't communicate with the kubernetes cluster:

kubectl get po -a

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 can run kubectl commands.

Anything else do we need to know:

I can SSH to the machine

--- ~ 禄 minikube ssh "hostname"                                                                                                           
minikubeVM

minikube start --show-libmachine-logs

stdout: https://gist.github.com/kozikow/fc76d2d34ebc4f0978c617d30835a852
stderr (with removed private keys contents): https://gist.github.com/kozikow/2bd521068fe09ad5bdd138bcaffdb812

~/.minikube/machines/minikubeVM/minikubeVM/Logs/VBox.log

https://gist.github.com/kozikow/d5727b6d302b874fad2f75556e4929ba
One thing which caught my eye is Error: Unable to connect to system D-Bus (2/3): D-Bus not installed.

My dbus appears to be installed:

--- ~ 禄 systemctl | grep dbus
dbus.service                                                                             loaded active running   D-Bus System Message Bus
dbus.socket                                                                              loaded active running   D-Bus System Message Bus Socket

Can't run regenerate-certs

There is nothing reported by docker-machine ls, so I can't run docker-machine regenerate-certs [name], as suggested by installation script

Virtualbox and network settings

When I open Virtualbox GUI I see minikubeVM running. When I navigate to settings->network I see two network adapters:

  • NAT
  • Host-only Adapter, vboxnet0

My host network interfaces reported by ip a:
https://gist.github.com/kozikow/9129b4221bf74683d3badb4d5a677b4b

I am not behind VPN or proxy.

public minikube ip

Based on tracepath output (similar to traceroute) it looked like my machine was trying to reach public ip reported by "minikube ip" rather than the internal network created by minikube.

I tried both:

sudo ip route add 192.168.99.100/32 dev vboxnet0
sudo ip route add 192.168.99.100/32 dev docker0

Both commands didn't help. Adding route for vboxnet0 failed with RTNETLINK answers: Network is down.

minikube logs

https://gist.github.com/kozikow/b3fa1814bf756b3bc3ff4a69fede133c
no errors in localkube.err, localkube.out seems fine.

Most helpful comment

Problem was solved after installing https://www.archlinux.org/packages/core/i686/net-tools/ . Adding it to Arch Linux AUR package will solve the problem in the future.

All 9 comments

Similar bug occurs with older version of minikube (0.8.0) installed from https://aur.archlinux.org/packages/minikube/ .

Problem was solved after installing https://www.archlinux.org/packages/core/i686/net-tools/ . Adding it to Arch Linux AUR package will solve the problem in the future.

Good catch @kozikow. The net-utils pkg looks like its a dependency if you're using the virtualbox driver. I'll update the AUR package accordingly.

I'm running minikube on mac behind a corporation proxy. If I use NAT, minikube can start but it cannot pull images from docker.io. If change to other network adapter, minikube cannot start:
minikube start --docker-env http_proxy=http://[proxy-host]:80 --docker-env https_proxy=https://[proxy-host]:80
Starting local Kubernetes cluster...
E0123 12:28:59.817614 26422 start.go:94] Error starting host: Temporary Error: Error configuring auth on host: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded.

Retrying.

I'm running minikube in ubuntu 14.04
kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?

Same problem as @Uditmittal, runnning Ubuntu 16.04 LTS with Minikube 0.18.0 and Virtualbox 5.0.36_Ubuntu, net-utils installed, firewall off/inactive (systemctl status firewalld.service -> Active: inactive (dead)).
Active: inactive (dead)

Same problem - upgrade to minikube 0.19 on Mac OS. Virtualbox Version 5.1.22
kubectl get pods The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?

Notice: I've upgraded to the version 0.19.0, deleted the virtual machine and deleted the whole ~/.minikube directory and it worked after this.

Same for me - I've delete complete minikube-directory. Also update my kubectl to last version. Now it works.

Was this page helpful?
0 / 5 - 0 ratings