Minikube on Windows behind an HTTP Proxy

8/5/2019

I'm trying to learn Kubernetes, so I tried Minikube v1.2 on Windows (10, 64-bit). The problem is I'm behind an HTTP Proxy. The Proxy is already set up in Windows, I always log in when I open up a Firefox session.

I followed the instruction in https://github.com/kubernetes/minikube/blob/master/docs/http_proxy.md setting up the 3 env variables (HTTP_PROXY, HTTPS_PROXY and NO_PROXY). I found out, thanks to another issue, that I had to set HTTPS_PROXY equal as HTTP_PROXY (I think because of the proxy itself somehow).

I launch this command to create the minikube VM:

minikube start --profile kubes --docker-env http_proxy="%HTTP_PROXY%"
--docker-env https_proxy="%HTTPS_PROXY%" --docker-env no_proxy="%NO_PROXY%"

Anyway I'm trying to do the minikube quickstart tutorial with the hello-minikube but I'm not able to reach the service. I always got error 504.

What am I doing wrong? Thank you very much

-- TheNobleSix
docker
kubernetes
minikube
proxy
windows

2 Answers

8/5/2019

I did it.

I had to add the minikube ip returned address to the NO_PROXY variable. The problem is that everytime I delete and recreate the VM for some reason, I have to change the ENV variable.

Is there a better way to do it?

-- TheNobleSix
Source: StackOverflow

8/5/2019

As per documentation:

Using Minikube with an HTTP Proxy

If your Virtual Machine address is 192.168.99.100, then chances are your proxy settings will prevent kubectl from directly reaching it. To by-pass proxy configuration for this IP address, you should modify your no_proxy settings. You can do so with:

export no_proxy=$no_proxy,$(minikube ip)

In windows you should consider adding these to your system settings or using setx.

Please follow refer to Setting Windows PowerShell environment variables

Hope this help.

-- Hanx
Source: StackOverflow