How to install Minikube in Ubuntu 20.04

Today is a rainning day on the cost zone on the Argentine South.

Talking with some friends of the India, appeared some doubts about some questions in a CKA revision meet to pass the CKA certification.

The idea was test some labs to asnwer some questions about the deployments of the applications and HA. But the lab of my dearly friend Askay was only one node with minkube.

So I was remember a tweet from Carlos Santana that a I readed few weeks ago and the result was deploy a new node with minikube using minikube commands.

The first step was reproducing the same scenario, so I decided install minikube on my laptop and share with yours a brief explanation:

Installing Minikube for ubuntu 20.04

Download the minikube, please.


Now, copied the files and gave some necessary permissions:

sudo cp minikube-linux-amd64 /usr/local/bin/minikube
sudo chmod 755 /usr/local/bin/minikube
minikube version

After obtain our minikube software, remember check if you have virtualbox or KVM in your machine. If you prefer Windows, It’s necessary activate Hyper-V.

It’s important knows that is a review of the problem of my friend and I was step by step your installation and startup as him did.

Startup the minikube cluster

Now, when we tried the Carlos recommendation, this solution did not found.
Let’s go and see that happened.

Minikube start

juanandres@prometheus:~$ minikube start
😄  minikube v1.25.1 on Ubuntu 20.04
✨  Automatically selected the virtualbox driver
💿  Downloading VM boot image ...
    > minikube-v1.25.0.iso.sha256: 65 B / 65 B [-------------] 100.00% ? p/s 0s
    > minikube-v1.25.0.iso: 226.25 MiB / 226.25 MiB  100.00% 2.78 MiB p/s 1m22s
👍  Starting control plane node minikube in cluster minikube
💾  Downloading Kubernetes v1.23.1 preload ...
    > preloaded-images-k8s-v16-v1...: 504.42 MiB / 504.42 MiB  100.00% 2.96 MiB
🔥  Creating virtualbox VM (CPUs=2, Memory=2900MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.23.1 on Docker 20.10.12 ...
    ▪ kubelet.housekeeping-interval=5m
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
    ▪ Using image
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

Run kubectl command and check nodes and pods running:

❯ kubectl get nodes                                                                                                                                                                         
NAME       STATUS   ROLES                  AGE   VERSION
minikube   Ready    control-plane,master   18m   v1.23.1

❯ kubectl get ns                                                                                                                                                                            
NAME              STATUS   AGE
default           Active   18m
kube-node-lease   Active   18m
kube-public       Active   18m
kube-system       Active   18m

Attach new node on minikube

On this moment , we decide attach the new node with the :

minikube add node 

See below please, to review the implemented command:

juanandres@prometheus:~$ minikube node add
😄  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
🔥  Creating virtualbox VM (CPUs=2, Memory=2200MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.23.1 on Docker 20.10.12 ...
🔎  Verifying Kubernetes components...
🏄  Successfully added m02 to minikube!

Check the new node

With kubectl commands we can check the new worker instance running fine:

❯ kubectl get nodes 
NAME           STATUS   ROLES                  AGE   VERSION
minikube       Ready    control-plane,master   20m   v1.23.1
minikube-m02   Ready    <none>                 41s   v1.23.1

Remember, Askay did start a minikube with one node, so was necessary only add a new node. If my friend did not start the service, the correct choice was this one:

minikube start --nodes=2 --cpus=2 --memory=2g

Have a nice week and enjoy your Kubernets mini lab !

A %d blogueros les gusta esto: