Linux K8S-UBUNTUHigh

Installing Kubernetes (Minikube) on Ubuntu 22.04/24.04

Detailed guide on deploying a single-node Kubernetes cluster (Minikube) on Ubuntu for development and testing.

Updated at February 14, 2026
30-60 minutes
Medium
FixPedia Team
ะŸั€ะธะผะตะฝะธะผะพ ะบ:Ubuntu 22.04 LTSUbuntu 24.04 LTS

Installing Kubernetes (Minikube) on Ubuntu

Minikube is a tool that allows you to run a single-node Kubernetes cluster locally on your computer. It's the perfect solution for developing, testing manifests, and learning Kubernetes without needing a full cloud or physical cluster.

In this guide, we will install Minikube with the Docker driver on Ubuntu 22.04/24.04. This driver is the most stable and performant option for Linux.

System Preparation

Before installation, ensure your system meets the minimum requirements:

  • 2+ GB of RAM (4 GB recommended)
  • Up to 20 GB of free disk space
  • Internet access to download images

1. Update System and Install Base Packages

Open a terminal and run:

sudo apt update && sudo apt upgrade -y
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common

2. Install Docker (Minikube Driver)

Minikube uses drivers to create a virtual machine or container. The docker driver runs on top of an already installed Docker.

# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

# Add Docker repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Install Docker
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Add current user to the docker group (to avoid using sudo)
sudo usermod -aG docker $USER
newgrp docker  # Apply group changes without reboot

Verify Docker installation:

docker --version
docker run hello-world  # Should print a welcome message

3. Install kubectl

kubectl is the command-line tool for managing Kubernetes clusters.

# Download the latest stable version
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

# Install the binary
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

# Verify installation
kubectl version --client

4. Install Minikube

# Download the latest Minikube version
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

# Install
sudo install minikube-linux-amd64 /usr/local/bin/minikube

# Verify
minikube version

Starting the Kubernetes Cluster

Now that all dependencies are installed, you can start the cluster.

# Start Minikube with explicit Docker driver
minikube start --driver=docker

What happens when you run the command:

  1. Minikube downloads the minikube image.
  2. Creates and starts a container (or virtual machine, depending on the driver).
  3. Sets up kubelet, apiserver, and other Kubernetes components inside the container.
  4. Copies the kubeconfig configuration to ~/.kube/config on your host machine so kubectl can manage the cluster.

Useful options for minikube start:

  • --memory โ€” RAM allocation (e.g., --memory=4096).
  • --cpus โ€” number of CPU cores (e.g., --cpus=2).
  • --image-mirror โ€” image mirror (useful in Russia).

Checking Cluster Status

minikube status

The output should contain host: Running, kubelet: Running, apiserver: Running.

Also verify that kubectl sees the cluster:

kubectl cluster-info
kubectl get nodes  # Should show one node with status Ready

Basic Minikube Management Commands

CommandDescription
minikube stopStop the cluster (container/VM stops, data persists).
minikube startStart a stopped cluster.
minikube deleteDelete the cluster and all its data.
minikube dashboardLaunch the Kubernetes Dashboard web UI (opens in browser).
minikube sshAccess the Minikube node's console.
minikube kubectl -- <command>Execute a kubectl command inside the cluster (if kubectl is not configured globally).

Additional Configuration (Optional)

Enabling Built-in Docker Registry

Minikube can start a local Docker registry inside the cluster, so you don't need to push images to Docker Hub.

minikube addons enable registry

After this, images can be tagged as localhost:5000/<image-name> and used in manifests.

Installing Ingress Controller (for HTTP Routing)

minikube addons enable ingress

Troubleshooting Common Issues

  1. Driver Error: minikube start fails with a driver-related error. Solution: Ensure the Docker service is running (sudo systemctl status docker). Explicitly specify the driver: minikube start --driver=docker.
  2. Insufficient Resources: Minikube fails to start due to lack of memory/CPU. Solution: Increase limits via --memory and --cpus or free up resources on the host machine.
  3. Port Conflict: Port 8443 (API server) or 2379 (etcd) is already in use. Solution: Stop other services using these ports, or start Minikube with --kubernetes-version=v1.28.0 (sometimes helps).
  4. kubectl doesn't see the cluster: After minikube start, kubectl get nodes returns an error. Solution: Check the KUBECONFIG variable. Minikube automatically installs the config at ~/.kube/config. Run export KUBECONFIG=~/.kube/config or minikube update-context.

Conclusion

You have successfully installed and started a local Kubernetes cluster using Minikube on Ubuntu. Now you can:

  • Deploy test applications (kubectl apply -f deployment.yaml).
  • Try kubectl commands (get, describe, logs, exec).
  • Explore managing configurations, secrets, and PersistentVolumes.

To clean up after your experiments, run minikube delete. To remove all components (Minikube, kubectl, Docker) โ€” use the apt package manager.

Next Steps: Explore the official Kubernetes tutorials or try deploying a simple application, like Nginx.

F.A.Q.

Minikube fails to start with error 'This container is having issues'. What to do?
`kubectl` command not found after installation.
Not enough memory to run Minikube.
Can Minikube be used without Docker?

Hints

Installing dependencies and updating the system
Installing Docker (recommended driver)
Installing kubectl
Installing Minikube
Starting the Minikube cluster
Verifying functionality
FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

ยฉ 2026 FixPedia. All materials are available for free.

Made with for the community