Advanced
Searching inInstall guides
How to search
  • Paste an error message in quotes, e.g. "permission denied", to find the fix table that explains it.
  • Choose an area and a part of the guide (install, first settings, daily use, security, fixes) to go straight to the right step.
  • "two words" finds the exact phrase.
  • Plain words find names, texts and examples.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search
Try:

Guide 24minikube / kind · Kubernetes

Install and set up minikube and kind (local Kubernetes)

minikube and kind give you a Kubernetes cluster on your own laptop or a CI runner in about one minute — to learn, to test YAML and Helm charts, and to run end-to-end tests in pipelines. minikube is best for learning (addons like ingress and dashboard); kind (Kubernetes in Docker) is best for CI and multi-node tests. This guide installs both on RHEL and Ubuntu and shows the daily commands, the configs that matter and the fixes.

  • 10 Lessons
  • 10 Commands

$ run as a normal user# run as root (or with sudo)

24.1

Know it before you install

Both run Kubernetes nodes as containers (minikube can also use VMs). You need a container engine first: Docker (recommended) or Podman. kubectl talks to them through a context they add to your kubeconfig.

Itemminikubekind
Program/usr/local/bin/minikube/usr/local/bin/kind
NeedsDocker or Podman (or a VM driver)Docker or Podman
Cluster configflags of minikube start, ~/.minikube/a YAML file (kind.yaml)
kubectl contextminikube (or the profile name)kind-<name>
Best forlearning, addons, minikube serviceCI, multi-node, testing many versions

What you need: 2 CPU, 4 GB free RAM (more for multi-node), Docker installed and your user in the docker group (see the Docker guide), and kubectl.

24.2

Install minikube (RHEL and Ubuntu)

curl -fsSLO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
install -m 0755 minikube-linux-amd64 /usr/local/bin/minikube
minikube version

There are also packages: minikube-latest.x86_64.rpm and minikube_latest_amd64.deb in the same place.

24.3

Install kind (RHEL and Ubuntu)

Choose the version from github.com/kubernetes-sigs/kind/releases (here v0.30.0):

KVER=v0.30.0
curl -fsSLo kind https://kind.sigs.k8s.io/dl/$KVER/kind-linux-amd64
install -m 0755 kind /usr/local/bin/kind
kind version

24.4

First configuration: start minikube

Run as your normal user (not root). Give it enough resources and the addons you need:

minikube config set driver docker
minikube config set cpus 2
minikube config set memory 4096
minikube start --kubernetes-version=stable
minikube addons enable ingress
minikube addons enable metrics-server
kubectl get nodes
SettingWhy
driver dockerFast and works in VMs; no nested virtualization needed.
cpus, memoryToo little memory = Pods Pending or OOM.
--kubernetes-versionTest the same version as your real cluster (for example v1.33.5).
Profiles (-p name)More than one cluster at the same time.

Use it:

kubectl create deployment web --image=nginx:1.27
kubectl expose deployment web --port=80 --type=NodePort
minikube service web --url
minikube image load myapp:dev
minikube dashboard --url
minikube stop
minikube delete

24.5

First configuration: a kind cluster file

A cluster with one control plane, two workers and ports 80/443 open on your machine (for an ingress controller):

kind.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: lab
nodes:
  - role: control-plane
    extraPortMappings:
      - containerPort: 80
        hostPort: 8080
        listenAddress: "127.0.0.1"
      - containerPort: 443
        hostPort: 8443
        listenAddress: "127.0.0.1"
  - role: worker
  - role: worker
kind create cluster --config kind.yaml --image kindest/node:v1.33.4
kind get clusters
kubectl cluster-info --context kind-lab
kind load docker-image myapp:dev --name lab
kind export logs ./kind-logs --name lab
kind delete cluster --name lab

The node image tag sets the Kubernetes version; each kind release lists the images it supports.

24.6

Daily use: which one when

  • Learning and demos: minikube — addons, dashboard, service --url make it easy.
  • CI pipelines: kind — starts fast, runs in Docker on any runner, easy to make and delete per job.
  • Test against many Kubernetes versions: kind with different --image tags.
  • A small server that stays up: neither — use k3s.

Example CI step (GitHub Actions or GitLab) with kind:

kind create cluster --name ci --wait 120s
kind load docker-image shop:${GIT_SHA} --name ci
helm upgrade --install shop ./chart --set image.tag=${GIT_SHA} --wait
kubectl get pods
kind delete cluster --name ci

24.7

Make it safe

Security checklist:

  • These clusters are for development and tests, not production.
  • Keep ports bound to 127.0.0.1 (listenAddress in kind) — do not expose a lab API or ingress to the network.
  • Do not put real production secrets or kubeconfigs into lab clusters.
  • The docker group is root on the host: use these tools on your own machine or a dedicated CI runner.
  • Delete clusters you do not use (minikube delete --all, kind delete clusters --all).

24.8

Update and remove

Download the new binary and install it the same way. Remove everything:

minikube delete --all --purge
kind delete clusters --all
rm /usr/local/bin/minikube /usr/local/bin/kind

24.9

Fix common problems

ProblemCauseFix
The "docker" driver should not be used with root privilegesYou ran minikube as root.Run as a normal user in the docker group.
Exiting due to PROVIDER_DOCKER_NOT_RUNNING / kind can not reach DockerDocker is stopped or no access.systemctl start docker; usermod -aG docker USER, log in again.
kind multi-node: nodes fail with too many open filesLow inotify limits.sysctl -w fs.inotify.max_user_watches=524288 fs.inotify.max_user_instances=512 (and in /etc/sysctl.d/).
Pods Pending, Insufficient memoryToo little RAM for the cluster.minikube config set memory 6144, recreate; fewer kind workers.
ErrImagePull for your local imageThe cluster can not see images on your machine.minikube image load / kind load docker-image, and imagePullPolicy: IfNotPresent.
kubectl talks to the wrong clusterWrong context.kubectl config get-contexts; kubectl config use-context kind-lab.
Port 8080 already in use (kind)Another app uses it.Change hostPort in kind.yaml.

24.10

Next steps

1Which tool fits a CI pipeline better, minikube or kind?

kind — it starts fast in Docker, is made from a YAML file, and is easy to delete per job.

2Your new image myapp:dev gives ErrImagePull in kind. Why?

The cluster nodes can not see your local images. Run kind load docker-image myapp:dev.

All commands in this chapter