Thursday 23 June 2022

Install minikube


minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes.

requirement: Docker container with 2 CPUs, 2GB of free memory 20GB of free disk space

curl -LO

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 71.4M  100 71.4M    0     0  31.3M      0  0:00:02  0:00:02 --:--:-- 31.3M

sudo install minikube-linux-amd64 /usr/local/bin/minikube

Install Docker Engine

docker --version

Docker version 20.10.16, build aa7e414

Post-installation steps for Linux anfter installing docker

#Manage Docker as a non-root user

sudo usermod -aG docker $USER

newgrp docker

docker run hello-world

Hello from Docker!


minikube start

* minikube v1.26.0 on Ubuntu 20.04

* Automatically selected the docker driver. Other choices: ssh, none

* Using Docker driver with root privileges

* Starting control plane node minikube in cluster minikube

* Pulling base image ...

* Downloading Kubernetes v1.24.1 preload ...

    > preloaded-images-k8s-v18-v1...: 405.83 MiB / 405.83 MiB  100.00% 19.32 Mi

    > 386.00 MiB / 386.00 MiB  100.00% 17.55 MiB p

    > 0 B [_________________________] ?% ? p/s 15s

* Creating docker container (CPUs=2, Memory=2200MB) ...

* Preparing Kubernetes v1.24.1 on Docker 20.10.17 ...

  - Generating certificates and keys ...

  - Booting up control plane ...

  - Configuring RBAC rules ...

* Verifying Kubernetes components...

  - Using image

* Enabled addons: storage-provisioner, default-storageclass

* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

sudo docker ps

CONTAINER ID   IMAGE                                 COMMAND                  CREATED         STATUS         PORTS                                                                                                                                  NAMES

11ed4e911c9f   "/usr/local/bin/entr…"   3 minutes ago   Up 3 minutes>22/tcp,>2376/tcp,>5000/tcp,>8443/tcp,>32443/tcp   minikube

kubectl get nodes

NAME       STATUS   ROLES           AGE     VERSION

minikube   Ready    control-plane   7m14s   v1.24.1

minikube node list


minikube node add --worker

* Adding node m02 to cluster minikube

! Cluster was created without any CNI, adding a node to it might cause broken networking.

* Starting worker node minikube-m02 in cluster minikube

* Pulling base image ...

* Creating docker container (CPUs=2, Memory=2200MB) ...

* Preparing Kubernetes v1.24.1 on Docker 20.10.17 ...

* Verifying Kubernetes components...

* Successfully added m02 to minikube!

kubectl get no

NAME           STATUS   ROLES           AGE   VERSION

minikube       Ready    control-plane   10m   v1.24.1

minikube-m02   Ready    <none>          80s   v1.24.1

minikube status


type: Control Plane

host: Running

kubelet: Running

apiserver: Running

kubeconfig: Configured


type: Worker

host: Running

kubelet: Running

kubectl get pods

No resources found in default namespace.

kubectl get pods -A

NAMESPACE     NAME                               READY   STATUS    RESTARTS      AGE

kube-system   coredns-6d4b75cb6d-fmhvp           1/1     Running   0             12m

kube-system   etcd-minikube                      1/1     Running   0             12m

kube-system   kindnet-47txl                      1/1     Running   0             3m11s

kube-system   kindnet-mxbdn                      1/1     Running   0             3m11s

kube-system   kube-apiserver-minikube            1/1     Running   0             12m

kube-system   kube-controller-manager-minikube   1/1     Running   0             12m

kube-system   kube-proxy-dj4wg                   1/1     Running   0             12m

kube-system   kube-proxy-g2bpt                   1/1     Running   0             3m12s

kube-system   kube-scheduler-minikube            1/1     Running   0             12m

kube-system   storage-provisioner                1/1     Running   1 (11m ago)   12m

kubectl run nginx --image=nginx

pod/nginx created

kubectl get pod -w


nginx   1/1     Running   0          22s

kubectl cluster-info

Kubernetes control plane is running at

CoreDNS is running at

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

minikube dashboard

* Enabling dashboard ...

  - Using image kubernetesui/dashboard:v2.6.0

  - Using image kubernetesui/metrics-scraper:v1.0.8

* Verifying dashboard health ...

* Launching proxy ...

* Verifying proxy health ...


curl <URL>

No comments:

Post a Comment