Sticky
Sticky

Reputation: 3959

Minikube Kubernetes won't allow ingress on Mac despite running as a VM

I ran minikube start --vm=true which output:

😄  minikube v1.12.2 on Darwin 10.15.5
✨  Using the docker driver based on existing profile
❗  Your system has 16384MB memory but Docker has only 1991MB. For a better performance increase to at least 3GB.

    Docker for Desktop  > Settings > Resources > Memory


👍  Starting control plane node minikube in cluster minikube
🔄  Restarting existing docker container for "minikube" ...
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.8 ...
🔎  Verifying Kubernetes components...
🌟  Enabled addons: dashboard, default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"

And then this minikube addons enable ingress which got me this error:

💡  Due to docker networking limitations on darwin, ingress addon is not supported for this driver.
Alternatively to use this addon you can use a vm-based driver:

    'minikube start --vm=true'

To track the update on this work in progress feature please check:
https://github.com/kubernetes/minikube/issues/7332

But I ran minikube with that specific flag - any suggestions?

Upvotes: 14

Views: 8804

Answers (1)

mario
mario

Reputation: 11108

It looks like your Minikube is not running as a VM. Actually it still uses Docker driver. Just take a closer look at the output, where Docker is mentioned a few times:

✨  Using the docker driver based on existing profile
❗  Your system has 16384MB memory but Docker has only 1991MB. For a better performance increase to at least 3GB.

    Docker for Desktop  > Settings > Resources > Memory

Where the key point is "based on existing profile"

and here:

🔄  Restarting existing docker container for "minikube" ...
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.8 ...

Although you're trying to start your Minikube with --vm=true option, it's apparently ignored and your default settings are used.

Most probably it happens because first time you ran it with --driver=docker option (either explicitly or implicitly) and it has been saved in your Minikube profile. To fix this you will probably need to remove your Minikube instance and then start it again with --vm=true option. You can be even more scecific and choose the exact hypervisor by providing --driver=hyperkit option.

So, simply try to start your Minikube this way:

minikube start --vm=true --driver=hyperkit

If this doesn't help and you'll see again the same output, mentioning that it is using docker driver all the time, run:

minikube stop && minikube delete && minikube start --vm=true --driver=hyperkit

This should resolve your issue. Once it starts using HyperKit hypervisor, you should be able to run minikube addons enable ingress without any errors.

Upvotes: 33

Related Questions