Kubernetes pod gets recreated when deleted

后端 未结 17 1069
清酒与你
清酒与你 2020-12-12 10:25

I have started pods with command

$ kubectl run busybox --image=busybox --restart=Never --tty -i --generator=run-pod/v1

Something went wrong

17条回答
  •  长情又很酷
    2020-12-12 11:01

    When the pod is recreating automatically even after the deletion of the pod manually, then those pods have been created using the Deployment. When you create a deployment, it automatically creates ReplicaSet and Pods. Depending upon how many replicas of your pod you mentioned in the deployment script, it will create those number of pods initially. When you try to delete any pod manually, it will automatically create those pod again.

    Yes, sometimes you need to delete the pods with force. But in this case force command doesn’t work.

提交回复
热议问题