About use minikube,Unable to pull images

3/18/2019

I'm trying to start Minikube, however it crashes. The command used and the output is as follows: Commad:

minikube start  

Output:

  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:

Can someone shed some light on why this happened?

-- Yang Zhou
kubernetes
minikube

1 Answer

3/18/2019

k8s.gcr.io is Google Container Registry. It is blocked in China, as I saw that you are a Chinese user.

Please use VPN or and try again.

-- Fei
Source: StackOverflow