Minikube: Minikube behind a proxy is hard to get working

Created on 14 Jul 2016  路  11Comments  路  Source: kubernetes/minikube

I've seen a couple of stackoverflow questions on this now:
http://stackoverflow.com/questions/38301724/error-while-creating-pods-in-kubernetes
http://stackoverflow.com/questions/38333172/kubectl-kubernetes-with-minikube-times-out

It'd be nice to add some docs on how to setup minikube to work behind a proxy.

kinbug

Most helpful comment

Also, from @anuribs information above -- does't quite work for me after adding the proxy-settings in /var/lib/boot2docker/profile

docker@minikubeVM:~$ sudo /etc/init.d/docker restart
Need TLS certs for minikubeVM,127.0.0.1,10.0.2.15,192.168.99.100
-------------------
docker@minikubeVM:~$

All 11 comments

Yes, that will greatly help. Please. Thanks, CJ.

Thanks for the bug. We should definitely make this easier. I'm not too familiar with working with proxies, so if anyone manages to get this working please let us know how and we can add it to our docs/take any required PRs.

I think we'd have to try to replicate the proxy settings from the host into the VM, at least for the docker daemon to communicate out anyway. Could also add flags for specifying proxy address, etc but would be better if we could just discover it from the host.

We'd probably also need to pass them into the localkube daemon as well, right? Will it respect the proxy settings automatically? What about pods that are running? Does docker automatically fwd in the proxy information to them?

Why does localkube require internet access? I can't think what for, but very possibly missing something. Pulling images is done by the Docker daemon which obviously needs proxy access set up if required. This would not be inherited by pods/containers though so if they need internet access (not the widest use case I would guess) that would be something down to the user to specify in env vars in pod specs perhaps?

Why does localkube require internet access?

You're probably right, I can't think of any reason it would either (although I wouldn't be surprised if it did for some reason).

If the Docker daemon is the only thing that needs to be configured this should be pretty easy.

I wouldn't be surprised if it did for some reason

This is Kubernetes - nothing surprises me :grimacing:

If the Docker daemon is the only thing that needs to be configured this should be pretty easy.

Yeah, add flags for proxy (http, https, noproxy?), default to env vars on host if not specified?

Maybe we should we just start with the env vars? This might just be a preference thing, but I'd like to see us move toward a stateful config model, something like:

minikube config set http_proxy foo
minikube config set num_cpus 4

before we blow up our list of command line flags.

Here is my latest update logs to the problem. https://github.com/kubernetes/minikube/issues/322#issuecomment-232727064

Also, from @anuribs information above -- does't quite work for me after adding the proxy-settings in /var/lib/boot2docker/profile

docker@minikubeVM:~$ sudo /etc/init.d/docker restart
Need TLS certs for minikubeVM,127.0.0.1,10.0.2.15,192.168.99.100
-------------------
docker@minikubeVM:~$

We need to document how to use these new flags before 0.7 goes out.

Was this page helpful?
0 / 5 - 0 ratings