<p>In my case this problem was when using OSX, so this answer may not work on other operating systems.</p>
<p>Adding the flag <code>--hyperkit-vpnkit-sock=auto</code> on <code>minikube start</code> solved the problem for me.
This limits you to using the hyperkit driver. If that tradeoff is worth it or not is up to you.</p>
<p>My complete <code>minikube start</code> command is as follows:</p>
<p><code>minikube start --hyperkit-vpnkit-sock=auto --vm=true --driver=hyperkit</code></p>

CC BY-SA 4.0
2022-02-21T12:32:09.060Z
2022-02-21T12:32:09.060Z
Hannes Knutsson
<p>An easy somewhat hacky solution is to disable split tunneling on your VPN, which will force all traffic from your host to go through the VPN itself.</p>
<p>How to do it depends on your specific client.</p>
<p>In some cases, you may need to ask the VPN's administrator (i.e. your company's IT department) to enable this option on the VPN appliance itself.</p>

CC BY-SA 4.0
2022-02-12T10:26:09.697Z
Interesting... I'll have to check with whomever is administering the VPN,
Hannes Knutsson
CC BY-SA 4.0
2022-02-12T00:12:02.257Z
2022-02-12T00:12:02.257Z
maplebird
<p>I am currently writing a script that deploys a number of applications to a local minikube cluster for development purposes. This script is working great on Linux, but then I tried it on Mac OSX.</p>
<p>When starting minikube on Mac OSX instead of using the host systems kernel, it spins up a VM that runs the minikube cluster instead.</p>
<p>An important part of this setup is that all the docker images we deploy to the minikube cluster are hosted in a private docker repository that is hosted on a private network. We use VPN to access the image repo when needed, which solves the problem nicely when running on Linux, since the container shares the host machines network config and is forced through the VPN tunnel.</p>
<p>When running the script on Mac OSX though, the minikube cluster is unable to reach the private docker repository since it is <a href="https://minikube.sigs.k8s.io/docs/drivers/" rel="nofollow noreferrer">now run in a VM</a> that is not being forced through the VPN tunnel. Thus resulting in the cluster being unable to pull the images.</p>
<p>Is there any good way to make minikube on Mac OSX use the host machines VPN configuration as well? I have been searching for a good solution to this, but am having problems finding a solution that works for me.</p>
<p>Best would be if the solution did not depend on any specific VPN software, but instead solved the problem on an OS-level (I hope you understand what I mean here) so that the developers may use any VPN client software they want.</p>
<p>I appreciate any help. I just want this script to run the same on all machines.</p>

<docker><docker-registry><minikube><macos><vpn>
Is it possible to make the minikube VM use the VPN configuration from the host machine?
Hannes Knutsson
# Is it possible to make the minikube VM use the VPN configuration from the host machine?

(Asked by: username_0 on 2022-02-11)

I am currently writing a script that deploys a number of applications to a local minikube cluster for development purposes. This script is working great on Linux, but then I tried it on Mac OSX.

When starting minikube on Mac OSX instead of using the host systems kernel, it spins up a VM that runs the minikube cluster instead.

An important part of this setup is that all the docker images we deploy to the minikube cluster are hosted in a private docker repository that is hosted on a private network. We use VPN to access the image repo when needed, which solves the problem nicely when running on Linux, since the container shares the host machines network config and is forced through the VPN tunnel.

When running the script on Mac OSX though, the minikube cluster is unable to reach the private docker repository since it is [now run in a VM](https://minikube.sigs.k8s.io/docs/drivers/) that is not being forced through the VPN tunnel. Thus resulting in the cluster being unable to pull the images.

Is there any good way to make minikube on Mac OSX use the host machines VPN configuration as well? I have been searching for a good solution to this, but am having problems finding a solution that works for me.

Best would be if the solution did not depend on any specific VPN software, but instead solved the problem on an OS-level (I hope you understand what I mean here) so that the developers may use any VPN client software they want.

I appreciate any help. I just want this script to run the same on all machines.

**Tags:** docker, docker-registry, minikube, macos, vpn


---

## 2 answers

### Answer by username_0 on 2022-02-21. Score: 1 | Accepted answer

In my case this problem was when using OSX, so this answer may not work on other operating systems.

Adding the flag `--hyperkit-vpnkit-sock=auto` on `minikube start` solved the problem for me.
This limits you to using the hyperkit driver. If that tradeoff is worth it or not is up to you.

My complete `minikube start` command is as follows:

`minikube start --hyperkit-vpnkit-sock=auto --vm=true --driver=hyperkit`


---

### Answer by username_1 on 2022-02-12. Score: 0

An easy somewhat hacky solution is to disable split tunneling on your VPN, which will force all traffic from your host to go through the VPN itself.

How to do it depends on your specific client.

In some cases, you may need to ask the VPN's administrator (i.e. your company's IT department) to enable this option on the VPN appliance itself.

> **Comments:**
> **username_0**: Interesting... I'll have to check with whomever is administering the VPN,  

---

