1. 程式人生 > >Kubernetes: Killing container with id docker://xxxx: Need to kill Pod問題

Kubernetes: Killing container with id docker://xxxx: Need to kill Pod問題

當前Kubernetes版本 v1.9.7,當delete pod失敗時,使用kubectl describe後發現這個pod有以下events資訊:

1234 Events:TypeReasonAgeFromMessage-------------------------NormalKilling16s(x19871over26d)kubelet,cn-hangzhou.i-bp1azsintzya8q0ykjskKillingcontainerwithiddocker://log-collector:NeedtokillPod

這個問題是Kubernetes偶發的BUG,使用以下命令強制刪除:

1 kubectldeletepodxxxxxx--grace-period=0--force

執行時會提示風險:

1 warning:Immediatedeletiondoesnotwaitforconfirmationthattherunningresourcehasbeenterminated.Theresourcemaycontinuetorunontheclusterindefinitely.