Home > Blockchain >  Understand how Minikube on Windows is run
Understand how Minikube on Windows is run

Time:11-12

I am trying to understand how Minikube is run on Windows, for the following setup. There are several related questions below, which I hope will help me understand holistically how this works.

Using minikube profile list, I get the following output.

C:\>minikube profile list
|----------|-----------|---------|--------------|------|---------|---------|-------|
| Profile  | VM Driver | Runtime |      IP      | Port | Version | Status  | Nodes |
|----------|-----------|---------|--------------|------|---------|---------|-------|
| minikube | docker    | docker  | 192.168.49.2 | 8443 | v1.20.7 | Running |     1 |
|----------|-----------|---------|--------------|------|---------|---------|-------|

Is this minikube a container running using my local installation of Docker Desktop? Thus whether it runs on WSL2 or Virtualbox is dependent on how I get my Docker Desktop run?

If I minikube ssh, I get to interact with docker within. From the output below, does it mean that each of the minikube kubernetes component is run as an individual container? Is this an example of docker-in-docker?

C:\>minikube ssh
Last login: Wed Nov 10 14:07:23 2021 from 192.168.49.1
docker@minikube:~$ docker ps --format '{{.Names}}'
k8s_storage-provisioner_storage-provisioner_kube-system_b7c766e9-48fe-45dd-a929-d6fd4b6fcf8b_0
k8s_POD_storage-provisioner_kube-system_b7c766e9-48fe-45dd-a929-d6fd4b6fcf8b_0
k8s_kube-proxy_kube-proxy-4r5hz_kube-system_71dc0877-5a47-4b2c-a106-ee41e5f6a142_0
k8s_coredns_coredns-74ff55c5b-pl7tb_kube-system_6cf31402-c3b4-4d86-8963-8a53e36b7878_0
k8s_POD_kube-proxy-4r5hz_kube-system_71dc0877-5a47-4b2c-a106-ee41e5f6a142_0
k8s_POD_coredns-74ff55c5b-pl7tb_kube-system_6cf31402-c3b4-4d86-8963-8a53e36b7878_0
k8s_kube-scheduler_kube-scheduler-minikube_kube-system_82ed17c7f4a56a29330619386941d47e_0
k8s_kube-apiserver_kube-apiserver-minikube_kube-system_01d7e312da0f9c4176daa8464d4d1a50_0
k8s_kube-controller-manager_kube-controller-manager-minikube_kube-system_c7b8fa13668654de8887eea36ddd7b5b_0
k8s_etcd_etcd-minikube_kube-system_c31fe6a5afdd142cf3450ac972274b36_0
k8s_POD_kube-scheduler-minikube_kube-system_82ed17c7f4a56a29330619386941d47e_0
k8s_POD_kube-controller-manager-minikube_kube-system_c7b8fa13668654de8887eea36ddd7b5b_0
k8s_POD_kube-apiserver-minikube_kube-system_01d7e312da0f9c4176daa8464d4d1a50_0
k8s_POD_etcd-minikube_kube-system_c31fe6a5afdd142cf3450ac972274b36_0
docker@minikube:~$

CodePudding user response:

Is a minikube container using the local installation of Docker Desktop?

Minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes. All you need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away: minikube start.

What you’ll need?

  • 2 CPUs or more
  • 2GB of free memory
  • 20GB of free disk space
  • Internet connection
  • Container or virtual machine manager, such as: Docker, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware

I want to point out the last sentence, you can choose from multiple containers or virtual machine managers. Docker is one of the options you could have chosen, and based on your post,your current deployment is using Docker as hypervisor.

Is it running on WSL2 or Virtualbox?

Here is some information about WSL2 and Virtualbox, but the information provided about your environment is not enough to determine if your deployment is in Virtualbox or WSL2.

Virtualbox hardware virtualization option is to allow the virtualization capabilities provided by the processor. This does not help with nested virtualization. You can run in Docker in Virtualbox as long as there is no hypervisor running inside. That is the case when we run Docker on Linux systems in Virtualbox. With Windows server, they run hyperv as well on top of which they run Windows server where Docker runs. That's why nested virtualization is needed here.

With Docker Desktop running on WSL 2, users can leverage Linux workspaces and avoid having to maintain both Linux and Windows build scripts. In addition, WSL 2 provides improvements to file system sharing, boot time, and allows access to some cool new features for Docker Desktop users.

Before you install the Docker Desktop WSL 2 backend, you must complete the following steps:

  • Install Windows 10, version 1903 or higher or Windows 11.
  • Enable WSL 2 feature on Windows.
  • Download and install the Linux kernel update package.

Does each of the minikube kubernetes components run as an individual container?

Minikube is a utility you can use to run Kubernetes on your local machine. It creates a single node cluster contained in a virtual machine (VM). This cluster lets you demo Kubernetes operations without requiring the time and resource-consuming installation of full-blown K8s.

Here are the basic concepts of kubernetes.

Deployment—configured and operational resources. Deployments are the overall processes that enable you to orchestrate your resources.

ReplicaSet—sets of pods that provide the resources for your services.

Pod—a unit that contains one or more containers along with attached storage resources, and configuration definitions. Pods are grouped together in ReplicaSets and all pods in a set run the same container images.

Node cluster—control plane and worker nodes that each contain one or more pods. The workers run your workloads and the control plane orchestrates the workers together. This is what Minikube creates.

Node processes—the various components that you use to connect and manage Kubernetes. Control plane processes include API servers, ectd, Scheduler, kube-controller-manager, and cloud-controller-manager. Worker processes include kubelet, kube-proxy, and your container runtime.

Container—the image you create to hold your applications.

  • Related