$ run as a normal user# run as root (or with sudo)
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.
| Item | minikube | kind |
|---|---|---|
| Program | /usr/local/bin/minikube | /usr/local/bin/kind |
| Needs | Docker or Podman (or a VM driver) | Docker or Podman |
| Cluster config | flags of minikube start, ~/.minikube/ | a YAML file (kind.yaml) |
| kubectl context | minikube (or the profile name) | kind-<name> |
| Best for | learning, addons, minikube service | CI, 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.
Install minikube (RHEL and Ubuntu)
Install kind (RHEL and Ubuntu)
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| Setting | Why |
|---|---|
driver docker | Fast and works in VMs; no nested virtualization needed. |
cpus, memory | Too little memory = Pods Pending or OOM. |
--kubernetes-version | Test 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:
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: 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: workerkind 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 labThe node image tag sets the Kubernetes version; each kind release lists the images it supports.
Daily use: which one when
- Learning and demos: minikube —
addons,dashboard,service --urlmake 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
--imagetags. - A small server that stays up: neither — use k3s.
Example CI step (GitHub Actions or GitLab) with kind:
Make it safe
Security checklist:
- These clusters are for development and tests, not production.
- Keep ports bound to
127.0.0.1(listenAddressin kind) — do not expose a lab API or ingress to the network. - Do not put real production secrets or kubeconfigs into lab clusters.
- The
dockergroup 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).
Update and remove
Fix common problems
| Problem | Cause | Fix |
|---|---|---|
The "docker" driver should not be used with root privileges | You ran minikube as root. | Run as a normal user in the docker group. |
Exiting due to PROVIDER_DOCKER_NOT_RUNNING / kind can not reach Docker | Docker is stopped or no access. | systemctl start docker; usermod -aG docker USER, log in again. |
kind multi-node: nodes fail with too many open files | Low inotify limits. | sysctl -w fs.inotify.max_user_watches=524288 fs.inotify.max_user_instances=512 (and in /etc/sysctl.d/). |
Pods Pending, Insufficient memory | Too little RAM for the cluster. | minikube config set memory 6144, recreate; fewer kind workers. |
ErrImagePull for your local image | The cluster can not see images on your machine. | minikube image load / kind load docker-image, and imagePullPolicy: IfNotPresent. |
kubectl talks to the wrong cluster | Wrong 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. |
Next steps
- Quick how-to: Create a local cluster with kind.
- Command pages: minikube, kind, kubectl.
- Local clusters at work: Clusters to practise, Throwaway clusters for tests.
- What you need first: Install and set up Docker Engine, Install and set up kubectl. A cluster that stays up: k3s.
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.