gpt4 book ai didi

kubernetes - Kubernetes中的Force Deletion Pod是否有任何问题

转载 作者:行者123 更新时间:2023-12-02 11:54:19 25 4
gpt4 key购买 nike

我试图完全清除我的kube env,但是有时当我运行helm delete --purge时,某些pod不会被删除(有时)。

使用kubectl delete pods --grace-period=0 --force是否有任何问题
还是一遍又一遍地使用此命令会导致群集或节点上出现任何问题?

最佳答案

根据K8S文档here。根据应用程序的不同,由于容器的复制,直到节点检测到并杀死其中一个容器,它可能会导致数据损坏或数据不一致。

Force deleting pods does not wait for confirmation that the pod's processes have been terminated, which can leave those processes running until the node detects the deletion and completes graceful deletion. If your processes use shared storage or talk to a remote API and depend on the name of the pod to identify themselves, force deleting those pods may result in multiple processes running on different machines using the same identification which may lead to data corruption or inconsistency. Only force delete pods when you are sure the pod is terminated, or if your application can tolerate multiple copies of the same pod running at once. Also, if you force delete pods the scheduler may place new pods on those nodes before the node has released those resources and causing those pods to be evicted immediately.



因此,取决于Pod是否正在使用任何共享资源。

关于kubernetes - Kubernetes中的Force Deletion Pod是否有任何问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52604625/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com