“幽灵" kubernetes吊舱卡在终止中 [英] "Ghost" kubernetes pod stuck in terminating
问题描述
我有一个处于终止"状态的kubernetes吊舱,可以阻止吊舱删除
I have a kubernetes pod stuck in "Terminating" state that resists pod deletions
NAME READY STATUS RESTARTS AGE
...
funny-turtle-myservice-xxx-yyy 1/1 Terminating 1 11d
...
其中funny-turtle
是此后已删除的头盔版本的名称.
Where funny-turtle
is the name of the helm release that have since been deleted.
输出:pod "funny-turtle-myservice-xxx-yyy" deleted
结果:它仍然以相同的状态显示.
-也尝试使用--force --grace-period=0
,结果相同但有额外警告
Output: pod "funny-turtle-myservice-xxx-yyy" deleted
Outcome: it still shows up in the same state.
- also tried with --force --grace-period=0
, same outcome with extra warning
警告:立即删除不会等待确认正在运行的资源已终止.该资源可能会无限期地继续在群集上运行.
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
尝试读取日志(kubectl日志...).
结果:Error from server (NotFound): nodes "ip-xxx.yyy.compute.internal" not found
但它不存在.
因此,我认为此Pod以某种方式与aws API断开了连接",这是由kubectl logs
打印的错误消息引起的.
So I assume this pod somehow got "disconnected" from the aws API, reasoning from the error message that kubectl logs
printed.
我将采取任何建议或指导来解释这里发生的事情以及如何摆脱它.
I'll take any suggestions or guidance to explain what happened here and how I can get rid of it.
试图查看"ghost"节点是否仍在(kubectl delete node ip-xxx.yyy.compute.internal
)但不存在.
Tried to see if the "ghost" node was still there (kubectl delete node ip-xxx.yyy.compute.internal
) but it does not exist.
推荐答案
尝试从广告连播中删除终结器:
Try removing the finalizers from the pod:
kubectl patch pod funny-turtle-myservice-xxx-yyy -p '{"metadata":{"finalizers":null}}'
这篇关于“幽灵" kubernetes吊舱卡在终止中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!