![使用kubeadm安装k8s1.26.2后,包括etcd,kube-proxy在内的所有pod都处于crashloopbackoff状态](https://linux22.com/image/784483/%E4%BD%BF%E7%94%A8kubeadm%E5%AE%89%E8%A3%85k8s1.26.2%E5%90%8E%EF%BC%8C%E5%8C%85%E6%8B%ACetcd%EF%BC%8Ckube-proxy%E5%9C%A8%E5%86%85%E7%9A%84%E6%89%80%E6%9C%89pod%E9%83%BD%E5%A4%84%E4%BA%8Ecrashloopbackoff%E7%8A%B6%E6%80%81.png)
我正在尝试在 debian11 上安装 k8s1.26,我的内核版本是 5.10.0/x86_64。这是我的 kubelet 日志。
Mar 09 17:51:55 devnew0 kubelet[369024]: I0309 17:51:55.933659 369024 scope.go:115] "RemoveContainer" containerID="4ace1812ec7d981b55a51f422287499bdacf240e7c739d50872e6de1892fa7a2"
Mar 09 17:51:55 devnew0 kubelet[369024]: E0309 17:51:55.934416 369024 pod_workers.go:965] "Error syncing pod, skipping" err="failed to \"StartContainer\" for \"etcd\" with CrashLoopBackOff: \"back-off 10s restarting failed container=etcd pod=etcd-devnew0_kube-system(419ed404bfcd79b143181759583871d1)\"" pod="kube-system/etcd-devnew0" podUID=419ed404bfcd79b143181759583871d1
kubectl 没有起作用。
E0309 18:06:07.103712 375368 memcache.go:238] couldn't get current server API group list: Get "https://162.105.85.70:6443/api?timeout=32s": dial tcp 162.105.85.70:6443: connect: connection refused
E0309 18:06:07.104510 375368 memcache.go:238] couldn't get current server API group list: Get "https://162.105.85.70:6443/api?timeout=32s": dial tcp 162.105.85.70:6443: connect: connection refused
E0309 18:06:07.106487 375368 memcache.go:238] couldn't get current server API group list: Get "https://162.105.85.70:6443/api?timeout=32s": dial tcp 162.105.85.70:6443: connect: connection refused
E0309 18:06:07.108326 375368 memcache.go:238] couldn't get current server API group list: Get "https://162.105.85.70:6443/api?timeout=32s": dial tcp 162.105.85.70:6443: connect: connection refused
E0309 18:06:07.110263 375368 memcache.go:238] couldn't get current server API group list: Get "https://162.105.85.70:6443/api?timeout=32s": dial tcp 162.105.85.70:6443: connect: connection refused
The connection to the server 162.105.85.70:6443 was refused - did you specify the right host or port?
crictl ps -a
CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID POD
dde80047d3aff 240e201d5b0d8 34 seconds ago Exited kube-controller-manager 131 fc8b51e8b4b44 kube-controller-manager-devnew0
d4157ed07257b 63d3239c3c159 2 minutes ago Exited kube-apiserver 128 96cad2187e463 kube-apiserver-devnew0
5910c6fb6fe53 fce326961ae2d 4 minutes ago Exited etcd 134 1fb01d0ecc4de etcd-devnew0
d635e40f9aade 6f64e7135a6ec 5 minutes ago Exited kube-proxy 114 c6c2597e5097a kube-proxy-2zmq7
e87d4f6d34e6d db8f409d9a5d7 5 minutes ago Exited kube-scheduler 143 0afe7b6d78151 kube-scheduler-devnew0
答案1
我已经解决了这个问题。我在 /etc/containerd/config.toml 中使用了一些已弃用的字段,导致某些节点正常工作,而其他节点则不能。感谢您的回答。