Introduction
Minikube is open source software for setting up a single-node Kubernetes cluster on your local machine. The software starts up a virtual machine and runs a Kubernetes cluster inside of it, allowing you to test in a Kubernetes environment locally.
Minikube is a tool that runs a single-node Kubernetes cluster in a virtual machine on your laptop.
In this tutorial we will show you how to install Minikube on CentOS 8.
Prerequisites
- A system running CentOS 8
- A user account with sudo privileges.
- docker has more than 1899MiB for Kubernetes
Installation
Just follow the steps below to setup the Minikube correctly.
- Update your system
sudo dnf update -y
- Install KVM Hypervisor because you are going to run the single node cluster inside a virtual machine, you need to set up a virtualization software.
Note: We will show you how to install quickly the KVM Hypervisor.
If you want to get more details with installation of KVM on your Linux machine, Please visit the link below.
- Start by installing the required packages Then start and enable the libvirtd process.
sudo dnf -y install epel-release
sudo dnf -y install libvirt qemu-kvm virt-install virt-top libguestfs-tools bridge-utils
sudo systemctl start libvirtd
sudo systemctl enable libvirtd
- Add your sudo user to the libvirt group.
sudo usermod -a -G libvirt $(whoami)
- open the configuration file of the virtualization.
sudo vim /etc/libvirt/libvirtd.conf
- Make sure that that the following lines has the same values as shown below.
unix_sock_group = "libvirt
unix_sock_rw_perms = "0770"
- Restart the libvirtd service
sudo systemctl restart libvirtd
- Install the latest Minikube package
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
- Give it the file executive permission
chmod +x minikube-linux-amd64
- Move it to the /usr/local/bin
sudo mv minikube-linux-amd64 /usr/local/bin/minikube
- Verify the installation of Minikube by checking its version
minikube version
![](http://unixcop.com/wp-content/uploads/2021/10/1-36.png)
- Install Kubectl by downloading the package, Run the following 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
- Give the executive permission for Kubectl
chmod +x kubectl
- Move it to the same directory where you stored Minikube which is /usr/local/bin
sudo mv kubectl /usr/local/bin/
- Also verify Kubectl by checking its version
kubectl version --client -o json
![](http://unixcop.com/wp-content/uploads/2021/10/2-17.png)
- Starting Minikube using Minikube start command and start a single node cluster inside a virtual machine by running the below commands
sudo groupadd docker
sudo usermod -aG docker $USER
sudo usermod -aG docker $USER && newgrp docker
sudo systemctl start docker
minikube start
NOTE:
If you are running minikube within a VM, consider using –driver=none
So just follow the above steps but replace the minikube start command with minikube start –driver=none
So it will be like that:
sudo usermod -aG docker $USER
sudo usermod -aG docker $USER && newgrp docker
sudo systemctl start docker
minikube start --driver=none
According to : https://minikube.sigs.k8s.io/docs/reference/drivers/none/
Access Minikube web console
If you want to activate minikube dashboard and login to the console you have to follow the steps below:
- First check the status of Minikube with command
minikube status
- List the addons enabled with kubectl
minikube addons list
- Start the minikube
minikube start
![](http://unixcop.com/wp-content/uploads/2021/10/1-37-1024x283.png)
- Then activate the Dashboard of Minikube with the command below
minikube dashboard
This command will Create a link taht make the localhost listens on a random port from Minikube ports as shown
![](http://unixcop.com/wp-content/uploads/2021/10/2-18-1024x131.png)
- Copy the link then go to your browser and paste it, You will be directed automatically to the Minikube Dashboard as shown.
![](http://unixcop.com/wp-content/uploads/2021/10/14-1.png)
- You can check The Kubernetes service with clicking on Service section on the left side as shown
![](http://unixcop.com/wp-content/uploads/2021/10/15-1.png)
Conclusion
In this article, you should have successfully installed Minikube on you CentOS 8.
Now you can enjoy with exploring all features of Kubernetes on your local machine.