2

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 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.

2 Answers 2

1

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

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.

1
  • Interesting... I'll have to check with whomever is administering the VPN, Feb 12, 2022 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.