Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
Wat het doet
minikube starts a one-node (or more) Kubernetes cluster in a VM or a container (Docker, podman, KVM, Hyper-V). It is made for learning and local development: easy add-ons, minikube service to open an app, minikube tunnel for LoadBalancer services.
It sets the kubectl context minikube for you.
Zo schrijf je het
minikube COMMAND [OPTIONS]Belangrijkste delen
Commands
start- Create or start the cluster.
stop/delete[--all]- Stop / remove the cluster.
status- Is it running?
addonslist/enableNAME- Show / turn on add-ons (ingress, metrics-server …).
serviceNAME[--url]- Open a Service in the browser or print its URL.
tunnel- Give LoadBalancer services an IP (keep it running).
dashboard- Open the Kubernetes dashboard.
imageloadIMAGE/imagebuild- Put a local image into the cluster.
kubectl--ARGS- Use the matching kubectl version.
ssh/logs- Shell in the node / cluster logs.
profilelist- List clusters (profiles).
Opties 7
Meest gebruikt
start options
Niets past bij dit filter.
Voorbeelden 10
$ als gewone gebruiker# als root (of met sudo)
1Start a cluster
minikube start --driver docker --kubernetes-version v1.31.2 kubectl get nodes2Turn on ingress and metrics
minikube addons enable ingress minikube addons enable metrics-server kubectl top pods -A3Open an app
4Use a local image without a registry
docker build -t shop:dev . minikube image load shop:dev5LoadBalancer services get an IP
minikube tunnel6A 3-node cluster with a name
minikube start -p lab --nodes 3 --cpus 2 --memory 4g7More power for the node
minikube start --cpus 4 --memory 8g8Dashboard
minikube dashboard9Status and IP
minikube status minikube ip10Stop at the end of the day, delete when done
minikube stop minikube delete --all
Niets past bij dit filter.
Let op
- minikube is for learning and development, not for production.
- With the Docker driver, NodePorts are not on your host IP; use
minikube service --urlortunnel.
Bestanden
~/.minikube/- Cluster files and cache.
~/.kube/config- Gets the
minikubecontext.
Tips om te onthouden
- kind starts faster in CI; minikube has the easier add-ons for learning.
Exitcodes
0 | OK. |
Other | Error (the code tells the area, for example 80 = guest problem). |