CodeBlanks Logo Icon CodeBlanks

Summary - Minikube

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), stop and delete manage the cluster life cycle.
  • Local images are used via minikube image load or docker-env.
  • addons enable installs components such as metrics-server, ingress and dashboard.
  • status, ip, service --url and dashboard --url are for access and status.
minikube start --driver=docker --cpus=4 --memory=8g
minikube addons enable metrics-server
minikube image load api:1.0

Practice 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

terminal
# buraya yaz

Sample solution

terminal
minikube delete
minikube start --driver=docker --cpus=2 --memory=4g
minikube addons enable metrics-server
minikube status

Expected 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.

Question
minikube ____
Answer
minikube stop

Explanation: stop keeps the state; delete removes it.

3 Match.

Term Meaning
start Create/start
stop Stop
delete Delete
addons Add-ons

All lessons in Intermediate