Minikube is an open source tool developed by SIG community which helps us to run Kubernetes cluster locally. It runs a single node cluster and provides a perfect environment to play around with Kubernetes.
In this article we are going to learn how to setup minikube cluster on Ubuntu 20.04 machine, hence the only pre-requisite is to have a machine with Ubuntu 20.04 running on it with internet connectivity.
Step 1: Install Docker
Since Kubernetes requires a container run time to execute the workloads, hence we need to setup docker at first place. We can install docker by using the below commands:
# apt update -y
# apt install apt-transport-https ca-certificates curl software-properties-common -y
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
# apt-cache policy docker-ce
# apt install docker-ce -y
# systemctl status docker
Note: Last command 'systemctl status docker' checks the status of docker service and it must be in running state, if not then there must an issue with the docker setup.
Step 2: Install Kubectl
Kubectl is the client which helps us to communicate with the Kubernetes cluster, hence execute the below commands to install the kubectl client:
# curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
# chmod +x kubectl
# mv kubectl /usr/local/bin/
Step 3: Check the version of kubelet
Execute the below command to check the kubelet version :
# kubectl version -o yaml
Step 4: Install Minikube
Minikube is available as a debian package and can be installed by executing below command:
# curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_1.6.2.deb && sudo dpkg -i minikube_1.6.2.deb
Step 5: Start Minikube Cluster
Last step is to start the cluster by using below command:
# minikube start --vm-driver=none &