Docker Pull设置代理解决Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection 2021-11-02 docker, k8s 今天搭建k8s集群时,发现一系列k8s.gcr.io的镜像无法pull: 123-<%>- docker pull k8s.gcr.io/kube-proxyUsing default tag: latestError response from daemon: Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) 原来是万恶的g/f….w,需要为docker设置代理,并重启docker daemon: 123456789101112sudo mkdir -p /etc/systemd/system/docker.service.d sudo touch /etc/systemd/system/docker.service.d/proxy.confsudo chmod 777 /etc/systemd/system/docker.service.d/proxy.confsudo echo '[Service]Environment="HTTP_PROXY=http://proxy.xxx.com:8888/" Environment="HTTPS_PROXY=http://proxy.xxx.com:8888/"' >> /etc/systemd/system/docker.service.d/proxy.confsudo systemctl daemon-reloadsudo systemctl restart dockersudo systemctl restart kubelet 下一篇 Ubuntu20安装SonarQube