关于使用minikube,无法拉出图像

时间:2019-03-18 14:52:05

标签: kubernetes minikube

我正在尝试启动Minikube,但是它崩溃了。使用的命令和输出如下: Commad:

minikube start  

输出:

  minikube v0.35.0 on linux (amd64)  
  Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...  
  Downloading Minikube ISO ...  
 184.42 MB / 184.42 MB [============================================]   100.00% 0s  
  "minikube" IP address is x.x.x.x
  Configuring Docker as the container runtime ...  
  Preparing Kubernetes environment ...  
  Downloading kubeadm v1.13.4  
  Downloading kubelet v1.13.4  
  Pulling images required by Kubernetes v1.13.4 ...  
  Unable to pull images, which may be OK: running cmd: sudo kubeadm   config images pull --config /var/lib/kubeadm.yaml: command failed: sudo   kubeadm config images pull --config /var/lib/kubeadm.yaml  
stdout:   
stderr: failed to pull image "k8s.gcr.io/kube-apiserver:v1.13.4": output: Error response from daemon: Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
, error: exit status 1
: Process exited with status 1
  Launching Kubernetes v1.13.4 using kubeadm ... 
  Error starting cluster: kubeadm init: 
sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI 

[init] Using Kubernetes version: v1.13.4
[preflight] Running pre-flight checks
    [WARNING Service-Docker]: docker service is not enabled, please run 'systemctl enable docker.service'
    [WARNING Swap]: running with swap on is not supported. Please disable swap
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
error execution phase preflight: [preflight] Some fatal errors occurred:
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.13.4: output: Error response from daemon: Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
, 
...
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

: Process exited with status 1
  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:

有人可以阐明为什么会发生这种情况吗?

1 个答案:

答案 0 :(得分:1)

k8s.gcr.io是Google容器注册表。如我所见,您是中国用户,因此在中国已被屏蔽。

请使用VPN或再试一次。