How to Install Minikube on CentOS


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.

This tutorial will show you how to install Minikube on CentOS 7 or CentOS 8.

Article on how to install Minikube on CentOS.


How to Install Minikube on CentOS

Step 1: Updating the System

The first step is to update the local repository to ensure the software you download is up to date:

sudo yum -y update

Note: This tutorial is also available for Ubuntu 18.04 and 20.04.

Step 2: Installing KVM Hypervisor

Since you are going to run the single node cluster inside a virtual machine, you need to set up a virtualization software. This quick tutorial shows you how to set up a KVM hypervisor. For a more detailed installation guide, please refer to the article How To Install KVM On CentOS.

1. Start by installing the required packages:

sudo yum -y install epel-release
sudo yum -y install libvirt qemu-kvm virt-install virt-top libguestfs-tools bridge-utils

2. Then, start and enable the libvirtd service:

sudo systemctl start libvirtd
sudo systemctl enable libvirtd

3. Confirm the virtualization service is running with the command:

systemctl status libvirtd

The output should tell you the service is active (running).

Check KVM status.

4. Next, add your user to the libvirt group:

sudo usermod -a -G libvirt $(whoami)

5. Then, open the configuration file of the virtualization service:

sudo vi /etc/libvirt/libvirtd.conf

6. Make sure that that the following lines are set with the prescribed values:

  • unix_sock_group = "libvirt"
  • unix_sock_rw_perms = "0770"

7. Finally, restart the service for the changes to take place:

sudo systemctl restart libvirtd.service

Step 3: Installing Minikube

Note: You are using the wget command to download Minikube. If you don’t have the software installed on your CentOS, run the command: sudo yum -y install wget.

With the virtualization service enabled, you can move on to installing Minikube.

1. Download the Minikube binary package using the wget command:

Download Minikube on CentOS.

2. Then, use the chmod command to give the file executive permission:

chmod +x minikube-linux-amd64

3. Finally, move the file to the /usr/local/bin directory:

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

4. With that, you have finished setting up Minikube. Verify the installation by checking the version of the software:

minikube version

The output should display the version of Minikube installed on your CentOS.

Verify Minikube installation.

Step 4: Installing Kubectl

Apart from installing Minikube, you also need to set up kubectl, the command line tool for working with Kubernetes.

1. Run the following command to download kubectl:

curl -LO`curl -s`/bin/linux/amd64/kubectl

2. Give it executive permission:

chmod +x kubectl

3. Move it to the same directory where you previously stored Minikube:

sudo mv kubectl  /usr/local/bin/

4. Verify the installation by running:

kubectl version --client -o json
Verify Kubectl installation.

Step 5: Starting Minikube

To start using Minikube and start a single node cluster inside a virtual machine, you just need to run the command:

minikube start

Working with Kubernetes

Now that you have set up the required software and launched your single-node cluster, you can start experimenting with Kubernetes locally.

Take a look at our section on managing Kubernetes with Minikube which covers commonly used commands in the Minikube dashboard. We also recommend learning how to build optimized containers for Kubernetes and reading up on Kubernetes security best practices. If you advance to more complex deployments, learn how to install Prometheus on Kubernetes and use it for monitoring.


After reading this article, you should have successfully installed Minikube on your CentOS 7 or CentOS 8. Now you can explore all the possibilities Kubernetes has to offer, on your local machine.

If you want to learn more about Kubernetes, take a look at our Complete Guide.

Was this article helpful?
Sofija Simic
Sofija Simic is an experienced Technical Writer. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.
Next you should read
What is Kubernetes? Complete Guide
April 20, 2023

If you are using Docker, you need to learn about Kubernetes. It is an open-source container orchestration...
Read more
How to Monitor Kubernetes With Prometheus
May 28, 2020

This tutorial shows you how to create a series of .yml files to set up Prometheus Monitoring on your...
Read more
Introduction to Kubernetes Persistent Volumes
January 27, 2020

Persistent Volumes are used in Kubernetes orchestration when you want to preserve the data in the volume even...
Read more
Building Optimized Containers for Kubernetes
December 18, 2019

Container deployment took the software development world by storm. Use the outlined guidelines and learn how...
Read more