docker Kubernetes -无法初始化控制平面

bcs8qyzn  于 12个月前  发布在  Docker
关注(0)|答案(3)|浏览(235)

有人能帮帮忙吗
运行'kubeadm init'时出现以下错误

[init] Using Kubernetes version: v1.25.0
[preflight] Running pre-flight checks
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[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.k8s.io/kube-apiserver:v1.25.0: output: E0901 16:50:43.675142    4165 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-apiserver:v1.25.0\": failed to resolve reference \"registry.k8s.io/kube-apiserver:v1.25.0\": failed to do request: Head https://registry.k8s.io/v2/kube-apiserver/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/kube-apiserver:v1.25.0"
time="2022-09-01T16:50:43-06:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-apiserver:v1.25.0\": failed to resolve reference \"registry.k8s.io/kube-apiserver:v1.25.0\": failed to do request: Head https://registry.k8s.io/v2/kube-apiserver/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
    [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.25.0: output: E0901 16:53:14.264007    4564 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-controller-manager:v1.25.0\": failed to resolve reference \"registry.k8s.io/kube-controller-manager:v1.25.0\": failed to do request: Head https://registry.k8s.io/v2/kube-controller-manager/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/kube-controller-manager:v1.25.0"
time="2022-09-01T16:53:14-06:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-controller-manager:v1.25.0\": failed to resolve reference \"registry.k8s.io/kube-controller-manager:v1.25.0\": failed to do request: Head https://registry.k8s.io/v2/kube-controller-manager/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
    [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-scheduler:v1.25.0: output: E0901 16:55:44.364804    4922 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-scheduler:v1.25.0\": failed to resolve reference \"registry.k8s.io/kube-scheduler:v1.25.0\": failed to do request: Head https://registry.k8s.io/v2/kube-scheduler/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/kube-scheduler:v1.25.0"
time="2022-09-01T16:55:44-06:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-scheduler:v1.25.0\": failed to resolve reference \"registry.k8s.io/kube-scheduler:v1.25.0\": failed to do request: Head https://registry.k8s.io/v2/kube-scheduler/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
    [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-proxy:v1.25.0: output: E0901 16:58:14.769855    5295 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-proxy:v1.25.0\": failed to resolve reference \"registry.k8s.io/kube-proxy:v1.25.0\": failed to do request: Head https://registry.k8s.io/v2/kube-proxy/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/kube-proxy:v1.25.0"
time="2022-09-01T16:58:14-06:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-proxy:v1.25.0\": failed to resolve reference \"registry.k8s.io/kube-proxy:v1.25.0\": failed to do request: Head https://registry.k8s.io/v2/kube-proxy/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
    [ERROR ImagePull]: failed to pull image registry.k8s.io/etcd:3.5.4-0: output: E0901 17:03:14.966455    6024 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/etcd:3.5.4-0\": failed to resolve reference \"registry.k8s.io/etcd:3.5.4-0\": failed to do request: Head https://registry.k8s.io/v2/etcd/manifests/3.5.4-0: dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/etcd:3.5.4-0"
time="2022-09-01T17:03:14-06:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/etcd:3.5.4-0\": failed to resolve reference \"registry.k8s.io/etcd:3.5.4-0\": failed to do request: Head https://registry.k8s.io/v2/etcd/manifests/3.5.4-0: dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher

字符串
我无法初始化控制平面,确保docker正在运行。kubectl,kubeadm也在工作。它看起来像K8端的问题,还是我做错了什么。

yhxst69z

yhxst69z1#

根据输出,它确实看起来像是由于以下线路导致的一些连接问题,可能是缓慢或无连接
无法提取图像registry.k8s.io**
你可以检查这连接到图像注册表与以下

ping registry.k8s.io

字符串
你应该从服务器得到响应,如果你没有得到响应,需要排除网络连接故障
PING registry.k8s.io(2600:1901:0:1013::(2600:1901:0:1013::))56数据字节64字节从2600:1901:0:1013::(2600:1901:0:1013::):icmp_seq=1 ttl=56 time=69.1 ms 64 bytes from 2600:1901:0:1013::(2600:1901:0:1013::):icmp_seq=2 ttl=56 time=83.9 ms 64 bytes from 2600:1901:0:1013::(2600:1901:0:1013::):icmp_seq=3 ttl=56时间=83.4 ms

i34xakig

i34xakig2#

查看错误消息

[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.25.0

字符串
图像没有被拉取,因此抛出ImagePull错误。您应该从运行initialize命令的机器上连接到Internet。

pw136qt2

pw136qt23#

在我的情况下,我必须从dockershim迁移到其他容器运行时,因为在Kubernetes 1.23. https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/之后不支持它。

相关问题