k8s_minikube - henk52/knowledgesharing GitHub Wiki
MiniCube
Introduction
References
- Mastering Kubernetes 3rd ed, 2020, Cigi Sayfan,
- Hec18 - Kubernetes for developers by Joseph Heck
- minikube documentation
Overview
minikube is a single-node cluster.
Operations
- minikube dashboard
- minikube delete
- minikube delete --all --purge
- minikube start
- minikube status
- minikube stop
- minikube service
- minikube service flask --url
- Show the full path to accessing a service that has been speced using 'nodePort'(Hec18,p80)
- minikube service flask --url
- minikube service list
Installation
See: Minikube start
Fresh installation
- cd ~/Downloads
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube start
minikube addons enable ingress
minikube addons enable dashboard
Update
See: how-to-update-minikube-latest-version
-
minikube update-check
-
TODO get the latest version
-
minikube stop
-
minikube delete
See: Set-up haproxy and minikube with passthrough in UnixGeneralTools.md
Using minikube
deploying a local container
See:
- minikube start
- minikube dashboard
- eval $(minikube -p minikube docker-env)
- cd ~/training/k8s/medium-rust-dockerize
- docker build -t rust-web-alpine .
- docker images
- minikube image ls --format table
- kubectl run rust-web-alpine --image=rust-web-alpine:latest --port=3030 --save-config --image-pull-policy=Never
- kubectl get pods --namespace=default
Troubleshooting
Please run minikube logs --file=logs.txt
and attach logs.txt to the GitHub issue.
Minkube installation
The recommended driver is "systemd"
stderr:
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
kubelet service is not enabled, please run 'systemctl enable kubelet.service'
Just run it
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
failed to load certificate: the certificate has expired
- minikube delete
- minikube start
error execution phase certs/apiserver-kubelet-client: failed to write or validate certificate "apiserver-kubelet-client": failure loading apiserver-kubelet-client certificate: failed to load certificate: the certificate has expired