How to solve the error report in kubeadm init due to lack of access to foreign mirror addresses
This article shows you how to solve the problem of reporting errors in kubeadm init due to lack of access to foreign mirror addresses, the content is concise and easy to understand, and it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
The kubeadm config images pull Times made a mistake:
1 ·W1114 13 version.go:101 07 virtual 39.744320 16239 version.go:101] could not fetch a Kubernetes version from the internet: unable to get URL "https://dl.k8s.io/release/stable-1.txt": Get https://dl.k8s.io/release/stable-1.txt: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
W1114 13:07:39.744396 16239 version.go:102] falling back to the local client version: v1.16.2
Failed to pull image "k8s.gcr.io/kube-apiserver:v1.16.2": output: Error response from daemon: Get https://k8s.gcr.io/v2/: proxyconnect tcp: dial tcp 172.96.236.117 k8s.gcr.io/kube-apiserver:v1.16.2 10070: connect: connection refused
, error: exit status 1
To see the stack trace of this error execute with-- vault 5 or higher
Solution: kubeadm init-image-repository registry.aliyuncs.com/google_containers-ignore-preflight-errors=Swap
If your / usr/lib/systemd/system/docker.service file has a configuration similar to the following two lines
1 ·Environment = "HTTPS_PROXY= http://www.ik8s.io:10080"
2 ·Environment = "NO_PROXY=127.0.0.0/8172.20.0.0/16"
Please comment on these two lines
The above content is how to solve the problem when kubeadm init, because you can not access the foreign image address to report an error, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.