minikube: none: VM is unable to access k8s.gcr.io -> exceeded while awaiting headers

[root@laptop ~]# minikube start --vm-driver=none 😄 minikube v1.6.1 on Fedora 29 ✨ Selecting ‘none’ driver from user configuration (alternates: []) 🤹 Running on localhost (CPUs=8, Memory=7735MB, Disk=15054MB) … ℹ️ OS release is Fedora 29 (Workstation Edition) ⚠️ VM is unable to access k8s.gcr.io, you may need to configure a proxy or set --image-repository 🐳 Preparing Kubernetes v1.17.0 on Docker ‘19.03.4’ … 💾 Downloading kubelet v1.17.0 💾 Downloading kubeadm v1.17.0 🚜 Pulling images … ❌ Unable to pull images, which may be OK: running cmd: “/bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm config images pull --config /var/tmp/minikube/kubeadm.yaml"”: /bin/bash -c “sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm config images pull --config /var/tmp/minikube/kubeadm.yaml”: exit status 1 stdout:

stderr: W1212 11:02:01.365969 19837 common.go:77] your configuration file uses a deprecated API spec: “kubeadm.k8s.io/v1beta1”. Please use ‘kubeadm config migrate --old-config old.yaml --new-config new.yaml’, which will write the new, similar spec using a newer API version. W1212 11:02:01.366538 19837 common.go:77] your configuration file uses a deprecated API spec: “kubeadm.k8s.io/v1beta1”. Please use ‘kubeadm config migrate --old-config old.yaml --new-config new.yaml’, which will write the new, similar spec using a newer API version. W1212 11:02:01.368659 19837 validation.go:28] Cannot validate kubelet config - no validator is available W1212 11:02:01.368670 19837 validation.go:28] Cannot validate kube-proxy config - no validator is available failed to pull image “k8s.gcr.io/kube-apiserver:v1.17.0”: 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 To see the stack trace of this error execute with --v=5 or higher

🚀 Launching Kubernetes …

💣 Error starting cluster: init failed. cmd: “/bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable–etc-kubernetes-manifests,DirAvailable–var-lib-minikube,DirAvailable–var-lib-minikube-etcd,FileAvailable–etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable–etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable–etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable–etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap"”: /bin/bash -c “sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable–etc-kubernetes-manifests,DirAvailable–var-lib-minikube,DirAvailable–var-lib-minikube-etcd,FileAvailable–etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable–etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable–etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable–etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap”: exit status 1 stdout: [init] Using Kubernetes version: v1.17.0 [preflight] Running pre-flight checks [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’

stderr: W1212 11:02:16.549054 20140 common.go:77] your configuration file uses a deprecated API spec: “kubeadm.k8s.io/v1beta1”. Please use ‘kubeadm config migrate --old-config old.yaml --new-config new.yaml’, which will write the new, similar spec using a newer API version. W1212 11:02:16.549673 20140 common.go:77] your configuration file uses a deprecated API spec: “kubeadm.k8s.io/v1beta1”. Please use ‘kubeadm config migrate --old-config old.yaml --new-config new.yaml’, which will write the new, similar spec using a newer API version. W1212 11:02:16.551904 20140 validation.go:28] Cannot validate kube-proxy config - no validator is available W1212 11:02:16.551914 20140 validation.go:28] Cannot validate kubelet config - no validator is available [WARNING Firewalld]: firewalld is active, please ensure ports [8443 10250] are open or your cluster may not function correctly [WARNING Service-Docker]: docker service is not enabled, please run ‘systemctl enable docker.service’ [WARNING IsDockerSystemdCheck]: detected “cgroupfs” as the Docker cgroup driver. The recommended driver is “systemd”. Please follow the guide at https://kubernetes.io/docs/setup/cri/ [WARNING Swap]: running with swap on is not supported. Please disable swap [WARNING FileExisting-socat]: socat not found in system path [WARNING Hostname]: hostname “minikube” could not be reached [WARNING Hostname]: hostname “minikube”: lookup minikube on 192.168.43.33:53: no such host [WARNING Service-Kubelet]: kubelet service is not enabled, please run ‘systemctl enable kubelet.service’ error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.17.0: 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 [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-controller-manager:v1.17.0: 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 [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-scheduler:v1.17.0: 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 [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-proxy:v1.17.0: 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 [ERROR ImagePull]: failed to pull image k8s.gcr.io/pause:3.1: 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 [ERROR ImagePull]: failed to pull image k8s.gcr.io/etcd:3.4.3-0: 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 [ERROR ImagePull]: failed to pull image k8s.gcr.io/coredns:1.6.5: 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=... To see the stack trace of this error execute with --v=5 or higher

😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you: 👉 https://github.com/kubernetes/minikube/issues/new/choose

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

Got a solution for this issue. For minikube to pull images it needs to have a public network connection which can be created by Virtual switch in HyperV.

  • In HyperV create a virtual network switch (type external) - all dfault settings. In windows powershell:

minikube start --vm-driver hyperv --hyperv-virtual-switch “My Virtual Switch”

Solves below issues while starting minikube: Ths issue - VM is unable to access k8s.gcr.io - Unable to pull images,

In the end for me it was dnsmasq messing with my connection. Turning it off solved the issue.

When I run curl https://k8s.gcr.io/

the output:

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>302 Moved</TITLE></HEAD><BODY>

302 Moved

The document has moved here. </BODY></HTML>

I met the same problem when using hyperkit as driver. Delete minikube and use another driver(e.g. virtualbox) is a quick solution.

PS C:\Windows\system32> minikube start --vm-driver=hyperv

  • minikube v1.6.1 on Microsoft Windows 10 Pro 10.0.17763 Build 17763
  • Selecting ‘hyperv’ driver from user configuration (alternates: [])
  • Creating hyperv VM (CPUs=2, Memory=2000MB, Disk=20000MB) … ! VM is unable to access k8s.gcr.io, you may need to configure a proxy or set --image-repository
  • Preparing Kubernetes v1.17.0 on Docker ‘19.03.5’ …
  • Pulling images …
  • Unable to pull images, which may be OK: running cmd: “/bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm config images pull --config /var/tmp/minikube/kubeadm.yaml"”: /bin/bash -c “sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm config images pull --config /var/tmp/minikube/kubeadm.yaml”: Process exited with status 1 stdout:

stderr: W1224 06:49:16.080769 3673 common.go:77] your configuration file uses a deprecated API spec: “kubeadm.k8s.io/v1beta1”. Please use ‘kubeadm config migrate --old-config old.yaml --new-config new.yaml’, which will write the new, similar spec using a newer API version. W1224 06:49:16.081889 3673 common.go:77] your configuration file uses a deprecated API spec: “kubeadm.k8s.io/v1beta1”. Please use ‘kubeadm config migrate --old-config old.yaml --new-config new.yaml’, which will write the new, similar spec using a newer API version. W1224 06:49:16.084063 3673 validation.go:28] Cannot validate kube-proxy config - no validator is available W1224 06:49:16.084132 3673 validation.go:28] Cannot validate kubelet config - no validator is available failed to pull image “k8s.gcr.io/kube-apiserver:v1.17.0”: 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 To see the stack trace of this error execute with --v=5 or higher

  • Launching Kubernetes …
  • Waiting for cluster to come online …
  • Done! kubectl is now configured to use “minikube” ! C:\Program Files\Docker\Docker\Resources\bin\kubectl.exe is version 1.10.3, and is incompatible with Kubernetes 1.17.0. You will need to update C:\Program Files\Docker\Docker\Resources\bin\kubectl.exe or use ‘minikube kubectl’ to connect with this cluster PS C:\Windows\system32>