weixin_39643338 2020-11-30 13:44 采纳率: 0%
浏览 0

Default grace period to 0 when --force is used to delete a pod, deployment, etc

What would you like to be added: Default grace period to 0 when using --force to delete a pod, deployment, etc

Why is this needed: If I run


kubectl delete pod test --force

I get a warning saying:


warning: --force is ignored because --grace-period is not 0.

And then it continues to delete the pod normally, without force.

Can kubectl just make the assumption that if you use --force and don't specify --grace-period, you are intending to immediately delete the pod and automatically set grace period to 0?

Warning the user after they already executed the command that they should have used --grace-period 0 and then proceeding to delete without force is not a great user experience. Presumably a reason for using force was because the user did NOT want to wait.

该提问来源于开源项目:kubernetes/kubectl

  • 写回答

5条回答 默认 最新

  • weixin_39643338 2020-11-30 13:44
    关注

    /assign

    Not sure what everyone thinks about this idea, but I'm going to take a stab at it make a PR

    评论

报告相同问题?