How to delete kubernetes pods (and other resources

2019-06-15 00:23发布

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 these items, they are recreated.

Can't seem to find a way to delete pods or replica sets belonging to the system namespace "kube-system"

标签: kubernetes
1条回答
仙女界的扛把子
2楼-- · 2019-06-15 00:45

If you created the pod using kubectl run, then you will need to delete the deployment (which created the replica set, which created the pod). Otherwise, the higher level controllers will continue to ensure that the objects they are responsible for keeping running stay around in the system, even if you try to delete them manually. Try kubectl get deployment --namespace=kube-system to see if you have a deployment in the kube-system namespace. If so, deleting it should also delete the replica set and the pods that you created.

查看更多
登录 后发表回答