title: Kubernetes failed to pull image k8s.gcr.io
body: <p>I am trying to install Kubernetes on my CentOS machine, when I intialize the cluster, I have the following error.</p>
  <p>I specify that I am behind a corporate proxy. I have already configured it for Docker in the directory: /etc/systemd/system/docker.service.d/http-proxy.conf
  Docker work fine.</p>
  <p>No matter how hard I look, I can't find a solution to this problem.</p>
  <p>Thank you for your help.</p>
  <pre><code># kubeadm init
  W1006 14:29:38.432071    7560 version.go:102] could not fetch a Kubernetes version from the internet: unable to get URL &quot;https://dl.k8s.io/release/stable-1.txt&quot;: Get &quot;https://dl.k8s.io/release/stable-1.txt&quot;: x509: certificate signed by unknown authority
  W1006 14:29:38.432147    7560 version.go:103] falling back to the local client version: v1.19.2
  W1006 14:29:38.432367    7560 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
  [init] Using Kubernetes version: v1.19.2
  [preflight] Running pre-flight checks
          [WARNING Firewalld]: firewalld is active, please ensure ports [6443 10250] are open or your cluster may not function correctly
          [WARNING HTTPProxy]: Connection to &quot;https://192.168.XXX.XXX&quot; uses proxy &quot;http://proxyxxxxx.xxxx.xxx:xxxx/&quot;. If that is not intended, adjust your proxy settings
          [WARNING HTTPProxyCIDR]: connection to &quot;10.96.0.0/12&quot; uses proxy &quot;http://proxyxxxxx.xxxx.xxx:xxxx/&quot;. This may lead to malfunctional cluster setup. Make sure that Pod and Services IP ranges specified correctly as exceptions in proxy configuration
          [WARNING IsDockerSystemdCheck]: detected &quot;cgroupfs&quot; as the Docker cgroup driver. The recommended driver is &quot;systemd&quot;. Please follow the guide at https://kubernetes.io/docs/setup/cri/
  [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.19.2: output: Error response from daemon: Get https://k8s.gcr.io/v2/: remote error: tls: handshake failure
  , error: exit status 1
          [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-controller-manager:v1.19.2: output: Error response from daemon: Get https://k8s.gcr.io/v2/: remote error: tls: handshake failure
  , error: exit status 1
          [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-scheduler:v1.19.2: output: Error response from daemon: Get https://k8s.gcr.io/v2/: remote error: tls: handshake failure
  , error: exit status 1
          [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-proxy:v1.19.2: output: Error response from daemon: Get https://k8s.gcr.io/v2/: remote error: tls: handshake failure
  , error: exit status 1
          [ERROR ImagePull]: failed to pull image k8s.gcr.io/pause:3.2: output: Error response from daemon: Get https://k8s.gcr.io/v2/: remote error: tls: handshake failure
  , error: exit status 1
          [ERROR ImagePull]: failed to pull image k8s.gcr.io/etcd:3.4.13-0: output: Error response from daemon: Get https://k8s.gcr.io/v2/: remote error: tls: handshake failure
  , error: exit status 1
          [ERROR ImagePull]: failed to pull image k8s.gcr.io/coredns:1.7.0: output: Error response from daemon: Get https://k8s.gcr.io/v2/: remote error: tls: handshake failure
  , error: exit status 1
  
  </code></pre>
  <pre><code># kubeadm config images pull
  W1006 17:33:41.362395   80605 version.go:102] could not fetch a Kubernetes version from the internet: unable to get URL &quot;https://dl.k8s.io/release/stable-1.txt&quot;: Get &quot;https://dl.k8s.io/release/stable-1.txt&quot;: x509: certificate signed by unknown authority
  W1006 17:33:41.362454   80605 version.go:103] falling back to the local client version: v1.19.2
  W1006 17:33:41.362685   80605 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
  failed to pull image &quot;k8s.gcr.io/kube-apiserver:v1.19.2&quot;: output: Error response from daemon: Get https://k8s.gcr.io/v2/: remote error: tls: handshake failure
  , error: exit status 1
  To see the stack trace of this error execute with --v=5 or higher
  </code></pre>