Setup
$ brew install minikube kubectl
$ docker --version
$ minikube version
$ kubectl version
Lifecycle of a cluster
$ minikube start
$ minikube start --kubernetes-version=1.31.0
$ minikube start --kubernetes-version=latest
$ minikube start --container-runtime=containerd
$ minikube start --driver=podman
$ minikube start --driver=kvm2
$ minikube pause
$ minikube unpause
$ minikube stop
$ minikube delete
$ minikube delete --all
Manage the clusters
$ minikube profile list
$ minikube addons list
$ minikube addons enable ADDON_NAME
$ minikube addons enable kubevirt
$ minikube addons disable ADDON_NAME
$ minikube config set memory 9001
$ minikube config defaults kubernetes-version
$ minikube service list
$ minikube service kubernetes-dashboard -n kubernetes-dashboard
$ minikube dashboard
Multiple Clusters
$ minikube start -p anothercluster --kubernetes-version=v1.30.0
$ kubectl config get-contexts
$ kubectl config use-context CONTEXT_NAME
$ minikube config set profile PROFILE_NAME
$ minikube profile list
Minikube config
$ cat ~/.minikube/profiles/PROFILE_NAME/config.json
$ cat ~/.minikube/machines/PROFILE_NAME/config.json
$ minikube config view
$ cat ~/.minikube/config/config.json
$ openssl x509 -noout -text -in ~/.minikube/ca.pem
$ openssl x509 -noout -text -in ~/.minikube/machines/server.pem
Explore the Node
$ docker ps
$ docker exec -it NAME bash
$ minikube ssh
$ minikube ssh -p PROFILE_NAME
docker@minikube:~$ ls /etc/kubernetes/manifests
docker@minikube:~$ ls /etc/kubernetes/addons
docker@minikube:~$ sudo cat /etc/kubernetes/admin.conf
docker@minikube:~$ openssl x509 -noout -text -in /var/lib/minikube/certs/ca.crt
docker@minikube:~$ openssl x509 -noout -text -in /etc/ssl/certs/minikubeCA.pem
docker@minikube:~$ sudo ctr -n k8s.io containers ls
docker@minikube:~$ docker ps
$ kubectl get node NODE_NAME -o yaml | grep containerRuntimeVersion