13

I guess that minikube needs VirtualBox because of dockers' dependencies, but my current docker version doesn't need it.

So do I still need VirtualBox or another VM to start minikube?

learnercys
  • 302
  • 1
  • 3
  • 16

6 Answers6

12

this is only case on window or osx, do need virtualbox, vmware to create minikube vm using boot2docker, in Linux even Linux VM minikube can directly run kubernetes in host docker when choice --vm-driver none, which uses localkube.

robertluwang
  • 331
  • 2
  • 7
7

Minikube uses the docker machine to manage the kubernetes VM, so it abstracts the plugin architecture that Docker Machine uses to provide a consistent way to manage various VM providers. Minikube embeds VirtualBox and VMware Fusion drivers so there are no additional steps to use them. However, other drivers require an extra binary to be present in the host PATH like KVM, xhyve, HyperV, etc.

Yes you need the virtualbox along with respective driver to run the kubernetes cluster on your machine and it is because of docker dependencies. Minikube started a virtual machine for us(based on our local environment), and a Kubernetes cluster is running in that VM i.e. all your nodes and services are running under the VM box.

mohan08p
  • 5,002
  • 1
  • 28
  • 36
  • 7
    And there is absolutely no way to run Minikube on docker that is not inside a VM? This is such a huge and useless overhead, I still cannot believe nobody thought about it, but this is the only mention I've found so far. – wvxvw Jan 17 '18 at 14:35
  • 1
    @wvxvw there is a way to run it without hypervisor (i guess it was not available at the time your comment was made) by specifying `--driver=none`. See https://kubernetes.io/docs/tasks/tools/install-minikube/ – Long Aug 20 '20 at 08:27
5

You can work on Minikube even without installing VirtualBox.

Minikube also supports a --driver=none option that runs the Kubernetes components on the host and not in a VM. Using this driver requires Docker and a Linux environment but not a hypervisor.

If you’re using the none driver in Debian or a derivative, use the .deb packages for Docker rather than the snap package, which does not work with Minikube. You can download .deb packages from Docker.

You can also use --driver=docker

For more information, you can refer here

shubham singh
  • 511
  • 1
  • 5
  • 16
1

Minikube creates a simple local kubernetes cluster having one VM. Minikube needs a hypervisor such as VirtualBox or KVM... to create this VM.

Minikube won't be able to start if VirtualBox (which is the default) is not available.

minikube start 

You will get this error:

VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
yamenk
  • 46,736
  • 10
  • 93
  • 87
  • 2
    you do not necessarily need VirtualBox. As @mohan08p answered: you need a docker-machine driver. – P.J.Meisch Aug 24 '17 at 12:58
  • 6
    Downvote, not correct. `sudo minikube --vm-driver none start` does work fine on linux systems (and doesnt require docker-machine) – leberknecht Sep 18 '18 at 09:41
1

As per minikube Windows Getting started you can now choose between Virtual Box and Hyper-V for Windows, meaning Virtual Box is not mandatory if you have Hyper-V.

Prerequisites

  • Windows 8 or above
  • A hypervisor, such as Hyper-V or VirtualBox
  • Hardware virtualization support must be enabled in BIOS
  • 4GB of RAM
Pool
  • 11,999
  • 14
  • 68
  • 78
  • The link you gave doesn't work anymore, but the [minikube start](https://minikube.sigs.k8s.io/docs/start/) page says you'll need a "[c]ontainer or virtual machine manager, such as: Docker, QEMU, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware Fusion/Workstation", implying that Docker will do the trick even without VirtualBox. I haven't tried it, yet, but it makes sense, as [VirtualBox is no longer required for Docker on Windows](https://docs.docker.com/desktop/windows/wsl/). – Garret Wilson Mar 19 '23 at 03:40
-2

Using minikube start --driver=docker works just fine. The docker engine could act as a virtual machine.

deleonab
  • 1
  • 2
  • 2
    [@shubhamsingh's answer](https://stackoverflow.com/a/61274537/10008173) already mentions this. At the time this question was written the Docker driver wasn't an option. – David Maze Dec 17 '22 at 14:16