Loading

k8s 将 cri 从 docker 切换到 containerd

master 节点执行

node=node01
kubectl drain $node --ignore-daemonsets --delete-emptydir-data

node 节点执行

systemctl stop kubelet docker.socket docker.service containerd
# 根据情况配置
containerd config default > /etc/containerd/config.toml
sed -i 's#registry.k8s.io/pause:3.9#registry.aliyuncs.com/google_containers/pause:3.6#g' /etc/containerd/config.toml

echo 'KUBELET_EXTRA_ARGS="--container-runtime=remote --container-runtime-endpoint=unix:///run/containerd/containerd.sock"' >  /etc/sysconfig/kubelet
systemctl daemon-reload 
systemctl restart containerd kubelet
posted @ 2024-01-12 16:06  小维江湖  阅读(88)  评论(0编辑  收藏  举报