启动
基于docker运行
minikube start --image-mirror-country='cn' --registry-mirror=https://docker.mirrors.ustc.edu.cn --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers
基于虚拟机运行
minikube start --vm=true --image-mirror-country='cn' --registry-mirror=https://docker.mirrors.ustc.edu.cn --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers
--image-mirror-country='cn' 默认k8s的镜像仓库
--registry-mirror= docker registry的镜像仓库
遇到如下错误时:
* Centos 8.5.2111 (amd64) 上的 minikube v1.25.2* 自动选择 docker 驱动。其他选项:none, ssh* The "docker" driver should not be used with root privileges.* If you are running minikube within a VM, consider using --driver=none:* https://minikube.sigs.k8s.io/docs/reference/drivers/none/X Exiting due to DRV_AS_ROOT: The "docker" driver should not be used with root privileges.
执行:
minikube start --force --driver=docker --image-mirror-country='cn' --registry-mirror=https://docker.mirrors.ustc.edu.cn --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers
2024.6.7补充
docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase:v0.0.44
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase:v0.0.44 gcr.io/k8s-minikube/kicbase:v0.0.44
minikube start --driver=docker --image-mirror-country=cn --base-image=gcr.io/k8s-minikube/kicbase:v0.0.44 --registry-mirror=https://xxx.mirror.aliyuncs.com --kubernetes-version=latest