Skip to content
LatchkeyLatchkey home

minikube start: Local Clusters for Tests

minikube start boots a local single-node Kubernetes cluster using a chosen driver and writes a kubeconfig context named minikube.

minikube is the long-standing local cluster tool. In CI it runs with the docker driver to give tests a real cluster, an alternative to kind with more built-in addons.

What it does

minikube start provisions a node via a driver (docker, kvm2, hyperkit, none), installs Kubernetes, and configures kubectl to point at it. Flags pin the version, allocate CPU/memory, and enable addons like ingress or the registry.

Common usage

Terminal
minikube start --driver=docker
minikube start --driver=docker \
  --kubernetes-version=v1.29.2 --cpus=2 --memory=4096
minikube addons enable ingress
minikube status

Options

FlagWhat it does
--driverVM/container driver: docker, kvm2, hyperkit, none
--kubernetes-versionPin the Kubernetes version
--cpus / --memoryResources for the node
--addonsEnable addons at start (e.g. ingress)
--waitComponents to wait on before returning

In CI

Use --driver=docker on hosted runners since nested virtualization is usually unavailable. Pin --kubernetes-version for reproducibility, keep --cpus/--memory within the runner limits, and run minikube delete in cleanup so a reused runner starts clean.

Common errors in CI

Exiting due to DRV_NOT_HEALTHY: ... docker ... not running means the Docker daemon is down. Exiting due to RSRC_INSUFFICIENT_CORES or insufficient memory means --cpus/--memory exceed the runner; lower them. Unable to pick a default driver means no usable driver was detected; pass --driver=docker explicitly.

Using this in CI

A runner has no kubeconfig, no cached context, and no interactive auth. Every kubectl invocation in CI needs the context supplied explicitly, and most confusing CI failures here are the command running against the wrong cluster or no cluster at all.

Terminal
# never rely on the ambient context on a runner
kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pods

# confirm what you are actually connected to before mutating anything
kubectl config current-context
kubectl cluster-info

# fail fast instead of hanging on an unreachable API server
kubectl --request-timeout=30s get nodes

Frequently asked questions

minikube start: Local Clusters for Tests?
minikube is the long-standing local cluster tool. In CI it runs with the docker driver to give tests a real cluster, an alternative to kind with more built-in addons.
What it does?
minikube start provisions a node via a driver (docker, kvm2, hyperkit, none), installs Kubernetes, and configures kubectl to point at it. Flags pin the version, allocate CPU/memory, and enable addons like ingress or the registry.
In CI?
Use --driver=docker on hosted runners since nested virtualization is usually unavailable. Pin --kubernetes-version for reproducibility, keep --cpus/--memory within the runner limits, and run minikube delete in cleanup so a reused runner starts clean.
Common errors in CI?
Exiting due to DRV_NOT_HEALTHY: ... docker ... not running means the Docker daemon is down. Exiting due to RSRC_INSUFFICIENT_CORES or insufficient memory means --cpus/--memory exceed the runner; lower them. Unable to pick a default driver means no usable driver was detected; pass --driver=docker explicitly.

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card