How to delete kubernetes pods (and other resources) in the system namespace

前端 未结 2 1329
无人共我
无人共我 2021-02-18 23:59

I have by mistake added a pod in the system namespace \"kube-system\". And then I am unable to remove this pod. It also seems to have created a replica set. Every time delete th

2条回答
  •  野的像风
    2021-02-19 01:03

    If a pod is recreated even after kubectl delete pod-name, it means that the pod is controlled by a higher level kubernetes objects such as Deployment, Replicaset, Replication controller.

    You can use kubectl describe pods pod-name | grep Controllers to find which controller your pod belongs to. You need to delete this higher level object to delete the pod.

提交回复
热议问题