Introduction
Kubernetes is the container orchestration platform of choice for many developers and organizations. To learn and test it on your own machine, you need two tools: Minikube, which runs a single-node Kubernetes cluster locally, and kubectl, the command-line tool you use to manage it. This hands-on guide walks you through installing Minikube and kubectl on Rocky Linux 9 (tested on 9.2), step by step, so you can build and test Kubernetes environments for development.
Prerequisites
Before you start, make sure you have:
- A machine running Rocky Linux 9, with internet access.
- Basic knowledge of the Linux command line.
- At least 2 CPU cores, 2GB RAM and 20GB of free storage.
Steps to Install Minikube with Kubectl on Rocky Linux 9
Step 1: Update the System and Install Dependencies
First, make sure your system is up to date and has curl installed. Run these commands in your terminal:
sudo dnf update -y
sudo dnf install -y curl
Step 2: Install Kubectl on Rocky Linux 9
kubectl is the command-line tool for working with Kubernetes clusters. Download the latest stable release and install it:
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
Step 3: Install Docker
Minikube needs a driver to run the cluster, and Docker is the most common choice. Add the Docker repository, install Docker, and start it:
sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io
sudo systemctl enable --now docker
Add your user to the docker group so Minikube can use Docker without root:
sudo usermod -aG docker $USER && newgrp docker
Step 4: Install Minikube
You can install Minikube in one of two ways.
Option A: Binary download
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

Option B: RPM package
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
sudo rpm -Uvh minikube-latest.x86_64.rpm
Step 5: Start the Minikube Cluster
With Minikube and kubectl installed, start your local Kubernetes cluster using the Docker driver:
minikube start --driver=docker

Verify the Installation
Check that both tools are installed and the cluster is running:
minikube version
kubectl version --client
minikube status
kubectl get nodes
Using Ubuntu instead? Follow our guide to installing Minikube and kubectl on Ubuntu.
Conclusion
You now have Minikube and kubectl installed on Rocky Linux 9, with a working single-node Kubernetes cluster for development and testing. From here you can start deploying and managing Kubernetes resources with kubectl commands.
Frequently Asked Questions (FAQs)
1. What is Minikube used for?
Minikube runs a single-node Kubernetes cluster on your local machine. It’s ideal for learning, development and testing, without needing a full-scale cluster.
2. Can I install Minikube on Linux distributions other than Rocky Linux?
Yes. Minikube works on most Linux distributions. The package manager commands differ slightly, but the kubectl and Minikube binary steps are the same.
3. How do I access applications running in my Minikube cluster?
Use kubectl port-forward to forward a port from your machine to a pod or service, or run minikube service <service-name> to open a service directly.
4. What hardware do I need to run Minikube?
At minimum, 2 CPU cores, 2GB of RAM and 20GB of free disk space.
5. Can I install Minikube on Windows or macOS?
Yes. Minikube supports Windows and macOS too. Follow the installation steps for your platform in the official Minikube documentation.

Leave a Reply