- First, ensure your system is up to date:
sudo dnf update -y
- Install required dependencies:
sudo dnf install -y qemu-kvm libvirt bridge-utils
- Start and enable libvirtd service:
sudo systemctl start libvirtd
sudo systemctl enable libvirtd
- Add your user to the libvirt group:
sudo usermod -aG libvirt $USER
- Download and install kubectl (Kubernetes command-line tool):
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- Download and install Minikube:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
sudo rpm -Uvh minikube-latest.x86_64.rpm
- Start Minikube:
minikube start --driver=kvm2
- Verify the installation:
minikube status
kubectl get nodes
Additional tips:
- If you want to use Docker as the driver instead of KVM, you’ll need to install Docker first and use
--driver=docker
when starting Minikube - You might need to log out and log back in for the group changes to take effect
- To stop Minikube when you’re done, use:
minikube stop
- To delete the Minikube cluster:
minikube delete
if you got this error,
❯ minikube start --driver=kvm2
😄 minikube v1.34.0 on Fedora 39
💢 Exiting due to GUEST_DRIVER_MISMATCH: The existing "minikube" cluster was created using the "docker" driver, which is incompatible with requested "kvm2" driver.
💡 Suggestion: Delete the existing 'minikube' cluster using: 'minikube delete', or start the existing 'minikube' cluster using: 'minikube start --driver=docker'
then you already have a Minikube cluster that was created using the Docker driver. You have two options:
- Continue using the Docker driver:
minikube start --driver=docker
- Or, if you prefer to switch to KVM2, first delete the existing cluster:
minikube delete
sminikube start --driver=kvm2
Choose option 1 if:
- You already have Docker set up and working well
- You want to keep any existing configurations/workloads
- Docker performance is satisfactory for your needs
Choose option 2 if:
- You specifically want to use KVM for better performance
- You don’t have any important configurations in your current cluster
- You want a fresh start with KVM virtualization