Summary - Minikube
- Docker & Kubernetes course
- Intermediate
- Lesson 12/82
- 5 min
Combine start, status and dashboard to set up a cluster.
Summary: Minikube
In this group:
- Minikube runs a Kubernetes cluster locally; kind and k3d are similar tools.
minikube start(--driver,--cpus,--memory,--nodes,-p),stopanddeletemanage the cluster life cycle.- Local images are used via
minikube image loadordocker-env. addons enableinstalls components such as metrics-server, ingress and dashboard.status,ip,service --urlanddashboard --urlare for access and status.
minikube start --driver=docker --cpus=4 --memory=8g
minikube addons enable metrics-server
minikube image load api:1.0Practice A clean start
Write four commands: delete the existing Minikube cluster; start again with the Docker driver, 2 CPUs and 4g memory; enable the metrics-server add-on; show the status.
Starter code
# buraya yazSample solution
minikube delete
minikube start --driver=docker --cpus=2 --memory=4g
minikube addons enable metrics-server
minikube statusExpected output
🔥 Deleting "minikube" in docker ... 🏄 Done! kubectl is now configured to use "minikube" cluster 🌟 The 'metrics-server' addon is enabled minikube type: Control Plane host: Running kubelet: Running apiserver: Running kubeconfig: Configured
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 If a pod created with a locally built image gives ErrImagePull, what is the likely cause?
- The image wasn't loaded into the cluster and it's being pulled from a registry Correct answer
- The port is wrong
- Minikube has stopped
- YAML indentation
Explanation: minikube image load and imagePullPolicy: IfNotPresent are the fix.
2 Stop the cluster but don't delete it.
minikube ____
minikube stop
Explanation: stop keeps the state; delete removes it.
3 Match.
| Term | Meaning |
|---|---|
start |
Create/start |
stop |
Stop |
delete |
Delete |
addons |
Add-ons |