Welcome to the Linux Foundation Forum!

Calico Pod fails to pull an image behind proxy

eksert
eksert Posts: 1
edited February 2023 in LFD259 Class Forum

Hello,

I try to run LFD259/SOLUTIONS/s_02/k8scp.sh which installs and deploys master node. I managed to run the default pods and the following is the get pod output

NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system calico-kube-controllers-74677b4c5f-hl67q 0/1 Pending 0 111m
kube-system calico-node-rzzsr 0/1 Init:ImagePullBackOff 0 111m
kube-system coredns-565d847f94-jx6mn 0/1 Pending 0 111m
kube-system coredns-565d847f94-mq2d7 0/1 Pending 0 111m
kube-system etcd-kube-master 1/1 Running 2 111m
kube-system kube-apiserver-kube-master 1/1 Running 2 111m
kube-system kube-controller-manager-kube-master 1/1 Running 4 111m
kube-system kube-proxy-2zr8p 1/1 Running 0 111m
kube-system kube-scheduler-kube-master 1/1 Running 63 111m

When calico-node-rzzsr pod tries to pull an image at the beginning it fails and stuck in Pending state, causing the following error message in describe pod output:

Failed to pull image "docker.io/calico/cni:v3.25.0": rpc error: code = DeadlineExceeded desc = failed to pull and unpack image "docker.io/calico/cni:v3.25.0": failed to resolve reference "docker.io/calico/cni:v3.25.0": failed to do request: Head "https://registry-1.docker.io/v2/calico/cni/manifests/v3.25.0": dial tcp xx.xx.xx.xx:443: i/o timeout

I use the following command instead for using calico as the link in the original link is broken:

kubectl apply -f https://docs.projectcalico.org/v3.25/manifests/calico.yaml

By the way I currently running this on Ubuntu 20.05 server on Virtual Box and my internet connection uses proxy and requires custom certificates which I previously introduced into system with "update-ca-certificates" command.

my NO_PROXY environment is: http://localhost,127.0.0.0/8,::1,10.0.2.4,kube-master,10.1.137.43,https://kubernetes,localhost

Does anyone has any solution?

Answers

Categories

Upcoming Training