Kubernetes pod gets recreated when deleted

后端 未结 17 1065
清酒与你
清酒与你 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 10:57

    With deployments that have stateful sets (or services, jobs, etc.) you can use this command:

    This command terminates anything that runs in the specified

    kubectl -n  delete replicasets,deployments,jobs,service,pods,statefulsets --all
    

    And forceful

    kubectl -n  delete replicasets,deployments,jobs,service,pods,statefulsets --all --cascade=true --grace-period=0 --force
    

提交回复
热议问题