How to install minikube on linux | ubuntu 18.04 | centos | rhel

Kubernetes is a popular container management tool used for orchestration. Deploying Kubernetes cluster requires good hardware and hence most of the tech people use Minikube. Minikube is a all in one Kubernetes cluster which can be deployed even on your laptop. Minikube is majorly used for development purpose by Application developers. We will setup Minikube on top of ubuntu 18.04 for this tutorial.

Prerequisites

  • We should have a working ubuntu server installed
  • Sudo privileges for installation and configuration.

Install Minikube on linux

We will access our ubuntu server using ssh and perform below steps: Lets update packages

sudo apt update

Install docker.io using below command

sudo apt install docker.io -y 

install minikube on linux

Lets enable and start docker services and verify same by checking the docker status

sudo systemctl start docker
sudo systemctl enable docker 
sudo systemctl status docker

Download Minikube

We will need wget to download minikube, lets install wget

sudo apt install wget

Download Minikube using wget

wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

We will give executabe permission to the newly downloaded minikube file

sudo chmod +x minikube-linux-amd64

Lets move minikube to the /usr/local/bin directory so that its accessible by PATH variable and we can execute minikube command

sudo mv minikube-linux-amd64 /usr/local/bin/minikube
minikube version

Install Kubectl

We will install and configure kubectl using which we will manage our minikube cluster.Download kubectl using below curl command

curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl 

We need to give executable permissions to kubectl and move it to /usr/local/bin directory.

chmod +x kubectl 
sudo mv kubectl  /usr/local/bin/ 
kubectl version --client -o json

Now we will install conntrack required by kubectl

sudo apt install conntrack 

Adding the current user to docker group and starting the minikube cluster

sudo usermod -a -G docker $USER

Starting Minikube cluster

We are done with the configuration, lets initialize or start the minikube cluster. Note: –vm-driver none

minikube start --vm-driver none 

Provide Minikube environment access to current user.

sudo mv /root/.kube /root/.minikube $HOME
sudo chown -R $USER $HOME/.kube $HOME/.minikube

We have successfully install minikube on linux | ubuntu. Lets do some basic minikube operations on the cluster.

minikube status
kubect cluster-info

Conclusion

We have successfully install minikube on linux and verified the minikube status and kubectl cluster information.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments