Minikube is a tool that makes it easy to run a single-node Kubernetes cluster locally on your computer. It allows developers to test and experiment with Kubernetes without the need for a remote cluster. Minikube runs a virtual machine on your local machine and then deploys a cluster inside that virtual machine.
It uses virtualization software such as Docker, QEMU, KVM2, VirtualBox, VMware, Podman, or Hyper-V to run a single-node Kubernetes cluster inside a virtual machine. This makes it easy to set up and run a cluster on your local machine for development and testing purposes. Minikube also provides a command line interface that allows you to interact with the cluster, such as deploying and scaling applications and managing the cluster’s resources.
In this article, we are going to use Docker as the driver type for Minikube.
First, let’s set up Docker.
Step 1. Adding the Docker repository
Code language: HTML, XML (xml)
sudo dnf config-manager --add-repo https:<em>//download.docker.com/linux/centos/docker-ce.repo</em>
Step 2. In this step, we install Docker and its dependencies.
Code language: CSS (css)
sudo dnf -y install docker-ce docker-ce-cli containerd.io
Step 4. Starting Docker
sudo systemctl start docker
Step 5. Let’s test if Docker works.
sudo docker run hello-world
Step 6. Adding the current user to the docker user group.
Code language: PHP (php)
sudo usermod -aG docker $USER && newgrp docker
Step 7. Download Minikube package.
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
Step 8. Install Minikube
sudo dnf install ./minikube-latest.x86_64.rpm
Step 9. Install and setup Kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
Step 10. Start Minikube with Docker as the driver type.
minikube start --driver=docker
You can also set the driver type to Docker
minikube config set driver docker
Additional steps (optional)
You can check the status of the Minikube environment by running
The output should be similar to
minikube type: Control Plane host: Running kubelet: Running apiserver: Running kubeconfig: Configured