Minikube is an all-in-one Kubernetes cluster that runs on your Linux system. It’s an open-source tool under the CNCF umbrella. The cluster operates inside a virtual machine and includes the container runtime environment that containers could run inside the node.
This is the easiest way to provision a Kubernetes cluster for testing and developing on your local environment.
This article will show you the steps to install Minikube on your Ubuntu 20.04 machine.
Firstly, let’s update the software packages list then upgrade your Ubuntu 20.04 machine by running the following commands:
$ sudo apt update
$ sudo apt upgrade
Please make sure that these below packages will be installed.
$ sudo apt install curl
$ sudo apt install apt-transport-https
Install the VirtualBox
In order to set up a single-node Kubernetes cluster with Minikube, you have to create a virtual machine on your Ubuntu machine. You can choose VirtualBox or KVM. In this guide, we use VirtualBox.
$ sudo apt install virtualbox virtualbox-ext-pack
After the installation is completed, let’s move to the next step.
Now, it’s time to download the latest Minikube from the official repository.
$ wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
The minikube file has just been downloaded, you have to grant the execute permission to it.
$ chmod +x minikube-linux-amd64
Next, move the minikube file to /usr/local/bin directory:
$ sudo mv minikube-linux-amd64 /usr/local/bin/minikube
Checking the minikube version:
$ minikube version
As you can see, the current version of minikube is v1.21.0.
In order to provision the All-In-One Kubernetes cluster, let’s start the minikube by running the following command:
$ minikube start
You’ve just successfully provisioned a Kubernetes cluster on your local machine.
Manage the Kubernetes cluster
To interact with the Kubernetes cluster, you have to install the kubectl tool.
$ curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
Granting the executing permission:
$ chmod +x kubectl
Then, move the kubectl binary to /usr/local/bin
$ sudo mv kubectl /usr/local/bin
Now, you can run some basic commands with kubectl to interact with your Kubernetes cluster. For examples:
To show the running node:
$ kubectl get node
To get the cluster information:
$ kubectl cluster-info
You’ve already go through the details of how to install Minikube on your Ubuntu 20.04 machine. Now, you can use the single-node Kubernetes with minikube to learn one of the most famous containers orchestration tools in the Cloud Native era.
If you have any concerns, please let me know. Thank you for reading.