minikube启动错误拉取新的外部镜像,可能需要配置代理

dex*_*123 7 kubernetes

我正在尝试启动 minikube 但它给了我这个错误

this vM is having trouble accessing https://k8s.gcr.io
To pull new external images, you may need to configure a proxy:
https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
Run Code Online (Sandbox Code Playgroud)

我尝试了 docker、HyperV 和 VirtualBox 相同的错误 kubectl 工作正常,但每当我尝试拉取像 Kubernetes-dashboard 这样的命名空间时,我都会收到 errimagepull

Cod*_*ard 5

选项1:

### Linux 
# Set your proxy
export HTTP_PROXY=http://<proxy hostname:port>
export HTTPS_PROXY=https://<proxy hostname:port>

### Windows
set HTTP_PROXY=http://<proxy hostname:port>
set HTTPS_PROXY=https://<proxy hostname:port>

# Start minikube  
minikube start
Run Code Online (Sandbox Code Playgroud)

选项2:

minikube start --image-repository=auto
Run Code Online (Sandbox Code Playgroud)

选项 3:

# Remove old content (minikube context)
minikube delete

# Start minikube with docker driver in case you have been using something else
minikube start --driver=docker
Run Code Online (Sandbox Code Playgroud)

选项 4.(如果您在中国)

$ minikube start            \
  --driver=docker           \
  ##
  ## Try with or without this flag if it's not working for you
  ## [optional] --image-mirror-country
  --image-mirror-country=cn \ 
  --registry-mirror=https://registry.docker-cn.com \ 
  --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers
Run Code Online (Sandbox Code Playgroud)