炫意html5
最早CSS3和HTML5移动技术网站之一

Kubernetes 升级至 1.24 后 kubelet 无法启动

将 kubernetes 从 1.23.5 升级至 1.24,container runtime 也从 docker 切换到 containerd ,但 kubelet 无法启动:

$ systemctl status kubelet
kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: activating (auto-restart) (Result: exit-code) since Mon 2022-05-09 17:14:37 CST; 5s ago
Docs: https://kubernetes.io/docs/home/
Process: 17952 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=1/FAILURE)
Main PID: 17952 (code=exited, status=1/FAILURE)

请问如何解决?

回答

改为命令行手动启动 kubelet

/usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf \
  --config=/var/lib/kubelet/config.yaml \
  --cgroup-driver=systemd \
  --network-plugin=cni \
  --pod-infra-container-image=registry.aliyuncs.com/google_containers/pause:3.6 \
  --resolv-conf=/run/systemd/resolve/resolv.conf \
  --container-runtime=remote \
  --container-runtime-endpoint=unix:///run/containerd/containerd.sock 

出现错误

Error: failed to parse kubelet flag: unknown flag: --network-plugin

炫意HTML5 » Kubernetes 升级至 1.24 后 kubelet 无法启动

Java基础教程Android基础教程