<p>I am trying to use Ingress in minikube by <code>minikube addons enable ingress</code>. However, currently Ingress cannot be used with minikube when the driver is <code>docker</code> on macOS based on this <a href="https://github.com/kubernetes/minikube/issues/7332" rel="nofollow noreferrer">issue ticket</a>.</p>
<p>So I turn to use <code>hyperkit</code> or <code>virtualbox</code> as driver. One image that need to be pulled when enabling Ingress is <code>k8s.gcr.io/ingress-nginx/controller:v0.44.0</code>. However, k8s.gcr.io is blocked in my current location.</p>
<p>So I try to use a VPN in global mode for my computer. However, I met <a href="https://github.com/kubernetes/minikube/issues/6296" rel="nofollow noreferrer">this issue</a> that hyperkit is unable to access k8s.gcr.io when the VPN is in use.</p>
<p>Then I found this document
<a href="https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/" rel="nofollow noreferrer">https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/</a></p>
<p>My VPN is listening at 127.0.0.1:1087, I set</p>
<pre class="lang-sh prettyprint-override"><code>export HTTP_PROXY=http://127.0.0.1:1087
export HTTPS_PROXY=https://127.0.0.1:1087
export NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.0/24,192.168.39.0/24
</code></pre>
<p>Then I tried all these methods to start minikube:</p>
<pre class="lang-sh prettyprint-override"><code>minikube start --driver=hyperkit
minikube start --driver=virtualbox
minikube start --driver=hyperkit --docker-env HTTP_PROXY=http://127.0.0.1:1087 --docker-env HTTPS_PROXY=https://127.0.0.1:1087 --docker-env NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.0/24,192.168.39.0/24
</code></pre>
<p>But I saw these messages:</p>
<pre class="lang-sh prettyprint-override"><code>😄  minikube v1.21.0 on Darwin 11.2.3
✨  Using the hyperkit driver based on user configuration
❗  Local proxy ignored: not passing HTTP_PROXY=http://127.0.0.1:1087 to docker env.
❗  Local proxy ignored: not passing HTTPS_PROXY=https://127.0.0.1:1087 to docker env.
👍  Starting control plane node minikube in cluster minikube
🔥  Creating hyperkit VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
❗  Local proxy ignored: not passing HTTP_PROXY=http://127.0.0.1:1087 to docker env.
❗  Local proxy ignored: not passing HTTPS_PROXY=https://127.0.0.1:1087 to docker env.
</code></pre>
<p>and</p>
<pre class="lang-sh prettyprint-override"><code>😄  minikube v1.21.0 on Darwin 11.2.3
✨  Using the virtualbox driver based on existing profile
❗  Local proxy ignored: not passing HTTP_PROXY=http://127.0.0.1:1087 to docker env.
❗  Local proxy ignored: not passing HTTPS_PROXY=https://127.0.0.1:1087 to docker env.
</code></pre>
<p>Seems this &quot;user configuration&quot; overwrite my proxy config. But where is this &quot;user configuration&quot;?</p>
<p>What is the correct way to set proxy for minikube when the drive <code>hyperkit</code> or <code>virtualbox</code>? Thanks!</p>

<p>My guess is 127.0.0.1 conflicts with the VM's internal 127.0.0.1 address, and that's why it's ignored. You might need to configure your proxy to be your host's network IP instead of 127.0.0.1? You might not even need to configure a proxy? Also, the Virtualbox driver gives me problems with VPN. I have the best luck with the VMware driver, and can also get the HyperKit driver to work if I update the VM's DNS to my host's DNS.</p>
<pre><code>minikube start --driver hyperkit
minikube ssh sudo resolvectl dns eth0 192.168.0.53
minikube ssh sudo resolvectl domain eth0 example.com
</code></pre>
<p>I also get the <code>unable to access k8s.gcr.io</code> error when creating the VM, but it doesn't seem to affect things.</p>
