Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

minikube

Run a local Kubernetes cluster on your laptop, with add-ons like ingress, metrics-server and a dashboard.

Niveau
DevOps-tool
Groep
Containers en Kubernetes
Root nodig
Nee
Pakket
minikube

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?
addons list / enable NAME
Show / turn on add-ons (ingress, metrics-server …).
service NAME [--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.
image load IMAGE / image build
Put a local image into the cluster.
kubectl -- ARGS
Use the matching kubectl version.
ssh / logs
Shell in the node / cluster logs.
profile list
List clusters (profiles).

Opties 7

Meest gebruikt

start options

--driver docker|podman|kvm2|hyperv
Where the node runs.
--kubernetes-version v1.31.2
Kubernetes version.
--nodes N
Number of nodes.
--cpus N / --memory 4g
Resources of the node.
-p, --profile NAME
Name of the cluster (run several).
--container-runtime containerd|cri-o
Runtime in the node.
--addons NAME
Turn on add-ons at start.

Voorbeelden 10

$ als gewone gebruiker# als root (of met sudo)

  1. 1Start a cluster

    minikube start --driver docker --kubernetes-version v1.31.2
    kubectl get nodes
  2. 2Turn on ingress and metrics

    minikube addons enable ingress
    minikube addons enable metrics-server
    kubectl top pods -A
  3. 3Open an app

    kubectl create deployment web --image nginx:1.27
    kubectl expose deployment web --port 80 --type NodePort
    minikube service web --url
  4. 4Use a local image without a registry

    docker build -t shop:dev .
    minikube image load shop:dev
  5. 5LoadBalancer services get an IP

    minikube tunnel
  6. 6A 3-node cluster with a name

    minikube start -p lab --nodes 3 --cpus 2 --memory 4g
  7. 7More power for the node

    minikube start --cpus 4 --memory 8g
  8. 8Dashboard

    minikube dashboard
  9. 9Status and IP

    minikube status
    minikube ip
  10. 10Stop at the end of the day, delete when done

    minikube stop
    minikube delete --all

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 --url or tunnel.

Bestanden

~/.minikube/
Cluster files and cache.
~/.kube/config
Gets the minikube context.

Tips om te onthouden

  • kind starts faster in CI; minikube has the easier add-ons for learning.

Exitcodes

0OK.
OtherError (the code tells the area, for example 80 = guest problem).

Volledige handleiding

Deze pagina legt het commando uit in eenvoudige woorden. De originele handleiding heeft elk detail.

In je terminal: man minikube