环境信息:
RKE2 版本:
rke2 version v1.26.9+rke2r1 (368ba42666c9664d58bd0a9f7d3d13cd38f6267d)
go version go1.20.8 X:boringcrypto
节点 CPU 架构,操作系统和版本:
# uname -a
Linux c702 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
集群配置:
“3 servers, 2 agents”
问题描述:
1、第一次安装失败删除后,残留一个pod “rancher-post-delete-6vzlf ”
# kubectl get pods -n cattle-system -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
rancher-post-delete-6vzlf 0/1 ErrImagePull 0 5m54s 10.42.4.4 c705 <none> <none>
2、第二次安装成功后,更新了该pod的镜像。结果运行后,正常的pod被删除
# kubectl get pods -n cattle-system -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
helm-operation-8fsvv 0/2 Completed 0 19m 10.42.4.5 c705 <none> <none>
helm-operation-l75xt 0/2 Completed 0 18m 10.42.3.7 c704 <none> <none>
helm-operation-nr7zr 0/2 Completed 0 17m 10.42.4.7 c705 <none> <none>
rancher-d4b4c6b4d-2464q 1/1 Running 0 23m 10.42.3.4 c704 <none> <none>
rancher-d4b4c6b4d-tkhbk 1/1 Running 0 23m 10.42.2.4 c703 <none> <none>
rancher-post-delete-6vzlf 0/1 ImagePullBackOff 0 35m 10.42.4.4 c705 <none> <none>
rancher-webhook-788c48b988-vq2b7 1/1 Running 0 17m 10.42.4.8 c705 <none> <none>
问:如何清除改pod,已尝试在rancher界面强制删除和kubectl delete pod删除
重现步骤:
- 安装 RKE2 的命令:
1、第一次安装
# helm install rancher rancher-latest/rancher \
> --namespace cattle-system \
> --set hostname=rancher7.rex.com \
> --set rancherImage=registry.cn-hangzhou.aliyuncs.com/rancher/rancher \
> --set ingress.tls.source=secret \
> --set systemDefaultRegistry=registry.cn-hangzhou.aliyuncs.com \
> --set rancherImageTag=v2.6.3
2、第二次安装
# helm install rancher rancher-stable-cn/rancher \
> --namespace cattle-system \
> --set hostname=rancher7.rex.com \
> --set ingress.tls.source=secret \
> --set replicas=2
3、更改rancher-post-delete-6vzlf镜像为rancher/shell
预期结果:
删除pod “rancher-post-delete-6vzlf ”
实际结果:
实际第二次部署的rancher被删除