minikube常用命令 2022-03-12

启动

基于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

你可能感兴趣的:(minikube常用命令 2022-03-12)