gpt4 book ai didi

kubernetes - k8s-即使Sidecar坠毁,也要保持 pods 向上

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

我有一个带小车的 pod 。 Sidecar进行文件同步,并且是可选的。但是,如果Sidecar崩溃,则整个 pods 将变得不可用。我希望Pod能够继续处理请求,即使Sidecar崩溃了也是如此。这可行吗?

最佳答案

将pod的restartPolicy设置为Never。即使其中一个容器发生故障,这也会阻止kubelet重新启动您的pod。

If a Pod is running and has two Containers. Container 1 exits with failure. If the restartPolicy it set to Never, the kubelet will not restart Container and the Pod's phase stays Running.


  • Reference
  • 关于kubernetes - k8s-即使Sidecar坠毁,也要保持 pods 向上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62665322/

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