What are the vm-driver and driver falgs in Minikube?

2.7k views Asked by At

I am using Minikube in macOS.

I found this in ~/.minikube/config/config.json:

{
    "driver": "docker",
    "vm-driver": "hyperkit"
}

What are they, and what is the difference? Does Minikube use Hyperkit as a virtual machine and run in it? If so, why do it needs the driver settings?

Also, I see a lot of minikube start with:

--docker-env http_proxy=url
--docker-env https_proxy=url
--docker-env no_proxy=url

there are the proxy settings in the docker settings (that is, the proxy settings in the dashboard in docker desktop for mac), are these parameters not needed if the driver is set to docker?

And does the proxy in docker refer to the network environment in hyperkit? Because I think docker pull and push are done in docker daemon, which is running on hyperkit.

2

There are 2 answers

0
RafaelJan On

I also was confused about the difference betwenn --vm-driver and --driver, and I found that --vm-driver is the old name and it is deprecated, and today --driver is the correct option

0
Tarun Lalwani On

Any environment set using --docker-env will go to the docker daemon service. And vm-driver is which hypervisor to use. If you run minikube start --help you will find below information

--driver='': Driver is one of: virtualbox, parallels, vmwarefusion, hyperkit, vmware, docker, podman

So you can use any of above drivers to start your k8s cluster.