<p>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 <code>kubectl</code> binary on its own isn't enough to use Kubernetes; you also need the rest of the cluster that goes with it.</p>

<p>There's no specific reason you can't directly install all of the Kubernetes cluster parts on the host (using <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/" rel="noreferrer"><code>kubeadm</code></a>, or <a href="https://minikube.sigs.k8s.io/docs/drivers/none/" rel="noreferrer">Minikube's "none" VM driver</a>), 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 <a href="https://kind.sigs.k8s.io" rel="noreferrer">Kind</a> 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.</p>

CC BY-SA 4.0
2020-05-08T12:13:41.277Z
Thank you David. That makes sense, but I still have a question. How does Amazon or Google run their k8s cluster on their cloud? I understand that minikube is suggested for dev and local only. Do cloud companies also use a VM? I thought one of the advantages of using kube is avoding VM to use full hardware performance.
Moon
CC BY-SA 4.0
2020-05-08T12:43:15.180Z
There are other ways to install Kubernetes.  If you're running your own cluster, there's a tool called `kops` that can do it; if you know all of the pieces involved, you can do it manually using a cluster automation tool like Ansible or Chef; I'm sure Google has their own internal tooling.  Those setups probably run "directly on the host", but host environments like EC2 or GCE are heavily virtualized already.  In particular Kubernetes benefits from being run in an environment where it's easy to dynamically add and remove nodes, which a cloud setup can offer.
David Maze
CC BY-SA 4.0
2020-05-08T13:51:29.903Z
Thanks David. I appreciate it. I'm still a bit confused tbh, but I think it's clear that I need to try both ways in order to understand fully.
Moon
CC BY-SA 4.0
2020-05-08T11:15:08.283Z
2020-05-08T11:15:08.283Z
David Maze
<p>I'm just getting started on k8s and got stuck on running k8s locally (it's running, but I don't understand exactly)</p>

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

<p>Isn't docker + k8s combination enough to run k8s locally?</p>

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

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

<p>Can anyone shed light on me?</p>

<kubernetes><minikube>
Why do I need tools like minikube or microk8s to run k8s locally?
Moon
# Why do I need tools like minikube or microk8s to run k8s locally?

(Asked by: username_0 on 2020-05-07)

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?

**Tags:** kubernetes, minikube


---

## 1 answers

### Answer by username_1 on 2020-05-08. Score: 6 | Accepted answer

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`](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/), or [Minikube's "none" VM driver](https://minikube.sigs.k8s.io/docs/drivers/none/)), 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](https://kind.sigs.k8s.io) 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.

> **Comments:**
> **username_0**: Thank you David. That makes sense, but I still have a question. How does Amazon or Google run their k8s cluster on their cloud? I understand that minikube is suggested for dev and local only. Do cloud companies also use a VM? I thought one of the advantages of using kube is avoding VM to use full hardware performance.  
> **username_1**: There are other ways to install Kubernetes.  If you're running your own cluster, there's a tool called `kops` that can do it; if you know all of the pieces involved, you can do it manually using a cluster automation tool like Ansible or Chef; I'm sure Google has their own internal tooling.  Those setups probably run "directly on the host", but host environments like EC2 or GCE are heavily virtualized already.  In particular Kubernetes benefits from being run in an environment where it's easy to dynamically add and remove nodes, which a cloud setup can offer.  
> **username_0**: Thanks David. I appreciate it. I'm still a bit confused tbh, but I think it's clear that I need to try both ways in order to understand fully.  

---

