学习Kubenetes,安装Minikube报错。提示无法访问k8s.gcr.io。
上网搜索,好像多数方法是用Docker拉取镜像改标签。感觉比较麻烦。
想用本地镜像库,运行:
minikube start --help |grep repo
--image-repository=‘‘: Alternative image repository to pull docker images from. This can be used when you have limited access to gcr.io. Set it to "auto" to let minikube decide one for you. For Chinese mainland users, you may use local gcr.io mirrors such as registry.cn-hangzhou.aliyuncs.com/google_containers
看到官方建议的解决方法是使用阿里云服务器。
使用下面的命令就可以安装:
sudo minikube start --image-repository=‘registry.cn-hangzhou.aliyuncs.com/google_containers‘
原文地址:https://www.cnblogs.com/pack27/p/12202687.html
时间: 2024-11-09 22:38:22