Kubernetes pod gets recreated when deleted

后端 未结 17 1052
清酒与你
清酒与你 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

    The root cause for the question asked was the deployment/job/replicasets spec attribute strategy->type which defines what should happen when the pod will be destroyed (either implicitly or explicitly). In my case, it was Recreate.

    As per @nomad's answer, deleting the deployment/job/replicasets is the simple fix to avoid experimenting with deadly combos before messing up the cluster as a novice user.

    Try the following commands to understand the behind the scene actions before jumping into debugging :

    kubectl get all -A -o name
    kubectl get events -A | grep 
    

提交回复
热议问题