5

I'm just getting started on k8s and got stuck on running k8s locally (it's running, but I don't understand exactly)

Pretty much all the tutorials on running k8s locally use minikube and I'm a little bit puzzled.

Isn't docker + k8s combination enough to run k8s locally?

Why do I need an extra layer with a virtual machine in order run k8s locally?

I've read about minikube and followed tutorials on the offical k8s website, but I'm still puzzled.

Can anyone shed light on me?

Moon
  • 153
  • 3

1 Answers1

6

Kubernetes has several system-level parts. It needs a functioning etcd cluster, the API server proper, and a per-node service called the kubelet. It also generally expects to be able to use 100% of the resources available on any given node for its own use. Just having the kubectl binary on its own isn't enough to use Kubernetes; you also need the rest of the cluster that goes with it.

There's no specific reason you can't directly install all of the Kubernetes cluster parts on the host (using kubeadm, or Minikube's "none" VM driver), but it will be trickier to maintain. It may or may not conflict with local Docker use, and it will be tricky to uninstall or upgrade it. If you run Minikube in a VM (or Kind in a Docker container) then all of the parts are preinstalled for you, and you can easily stop or delete the VM (or container) when you don't need it any more.

David Maze
  • 521
  • 3
  • 5