Kubeadm init errors

Dears,

I’ve some problems with cluster initialization on vm’s. I’ve got such errors:

Aug  4 13:43:05 k8smaster dockerd: time="2021-08-04T13:43:05.717395707+02:00" level=warning msg="Error getting v2 registry: Get \"https://k8s.gcr.io/v2/\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
Aug  4 13:43:05 k8smaster dockerd: time="2021-08-04T13:43:05.717447179+02:00" level=info msg="Attempting next endpoint for pull after error: Get \"https://k8s.gcr.io/v2/\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
Aug  4 13:43:05 k8smaster dockerd: time="2021-08-04T13:43:05.719617335+02:00" level=error msg="Handler for POST /v1.41/images/create returned error: Get \"https://k8s.gcr.io/v2/\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
Aug  4 13:44:25 k8smaster dockerd: time="2021-08-04T13:44:25.622479123+02:00" level=warning msg="Error getting v2 registry: Get \"https://k8s.gcr.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Aug  4 13:44:25 k8smaster dockerd: time="2021-08-04T13:44:25.622573678+02:00" level=info msg="Attempting next endpoint for pull after error: Get \"https://k8s.gcr.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Aug  4 13:44:25 k8smaster dockerd: time="2021-08-04T13:44:25.624445759+02:00" level=error msg="Handler for POST /v1.41/images/create returned error: Get \"https://k8s.gcr.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"

Cluster information:

[root@k8smaster log]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)
[root@k8smaster log]# rpm -qa |grep -e kube -e docker
docker-ce-20.10.8-3.el7.x86_64
kubeadm-1.21.3-0.x86_64
kubernetes-cni-0.8.7-0.x86_64
docker-ce-cli-20.10.8-3.el7.x86_64
kubelet-1.21.3-0.x86_64
docker-scan-plugin-0.8.0-3.el7.x86_64
docker-ce-rootless-extras-20.10.8-3.el7.x86_64
kubectl-1.21.3-0.x86_64
[root@k8smaster log]#

I suppose that I’ve some network errors. Am I right? or nor?
Is there any way to run kubeadm init through proxy?

Best Regards,
Dan

Client.Timeout exceeded while awaiting headers

Whenever you see “timeout” just think “blocked”. Something is blocking this from working. Check firewall rules (firewallcmd & iptables in RHEL based distros) and any networking hardware’s firewall rules.

Is there any way to run ‘kubeadm init’ command through proxy?

Image pulls are handled by whatever container runtime you use (looks like docker). Have you configured docker with the proxy config?

@mrbobbytables

Probably no. It was standard installation in this way:

sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

sudo yum install -y docker-ce docker-ce-cli containerd.io

and docker.service is without proxy settings.

I was abble to add docker repo and install all needed packages.

What do you suggest?

Finally our Network Team opened me “the door” to out side and cluster initialization went without problem. Thanks for all suggestions.