kubeadm init初始化報錯解決,親測


[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 registry.aliyuncs.com/google_containers/kube-apiserver:v1.15.1: output: Error response from daemon: 
Get https://registry.aliyuncs.com/v2/: proxyconnect tcp: dial tcp 172.96.236.117:10080: connect: connection refused, error: exit status 1
	[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/kube-controller-manager:v1.15.1: output: Error response from
 daemon: Get https://registry.aliyuncs.com/v2/: proxyconnect tcp: dial tcp 172.96.236.117:10080: connect: connection refused, error: exit status 1
	[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/kube-scheduler:v1.15.1: output: Error response from daemon: 
Get https://registry.aliyuncs.com/v2/: proxyconnect tcp: dial tcp 172.96.236.117:10080: connect: connection refused, error: exit status 1
	[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/kube-proxy:v1.15.1: output: Error response from daemon: Get 
https://registry.aliyuncs.com/v2/: proxyconnect tcp: dial tcp 172.96.236.117:10080: connect: connection refused, error: exit status 1
	[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/pause:3.1: output: Error response from daemon: Get https://r
egistry.aliyuncs.com/v2/: proxyconnect tcp: dial tcp 172.96.236.117:10080: connect: connection refused, error: exit status 1
	[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/etcd:3.3.10: output: Error response from daemon: Get https:/
/registry.aliyuncs.com/v2/: proxyconnect tcp: dial tcp 172.96.236.117:10080: connect: connection refused, error: exit status 1
	[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/coredns:1.3.1: output: Error response from daemon: Get https
://registry.aliyuncs.com/v2/: proxyconnect tcp: dial tcp 172.96.236.117:10080: connect: connection refused
  • 解決

在你原來運行命令的基礎上,加如下,指定國內的源

[root@kmaster ~]# kubeadm init --image-repository registry.aliyuncs.com/google_containers --ignore-preflight-errors=Swap

另外

如果你的/usr/lib/systemd/system/docker.service 文件有類似如下兩行配置

Environment="HTTPS_PROXY=http://www.ik8s.io:10080"
Environment="NO_PROXY=127.0.0.0/8,172.20.0.0/16"

注釋或者刪除掉就好了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM