多个容器POD中的一个容器进程崩溃会发生什么情况? [英] What happens one of the container process crashes in multiple container POD?

查看:688
本文介绍了多个容器POD中的一个容器进程崩溃会发生什么情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常在单个容器POD中,当容器的主要过程崩溃时,容器会重新启动.

Normally in single container POD, The pod will be restarted when the primary process of the container crashes.

如果第二个容器中的一个进程崩溃,则在多个容器POD的情况下会发生什么? POD会重新启动吗?

What will happen in case of multiple container PODs if one if process in the second container crashes ? Will the POD be restarted ?

推荐答案

从文档此处

Pod正在运行,并且有两个容器.容器1退出失败.

Pod is running and has two Containers. Container 1 exits with failure.

  1. 记录失败事件.

  1. Log failure event.

如果restartPolicy为:

If restartPolicy is:

  • 始终:重新启动容器; Pod阶段保持运行状态.
  • OnFailure:重新启动容器; Pod阶段保持运行状态.
  • 从不:不要重新启动Container; Pod阶段保持运行状态

因此pod不会重新启动或其他容器也不会重新启动,只有已退出的容器会根据restartPolicy

So pod is not restarted or the other container is not restarted , only the exited container is restarted based on the restartPolicy

这篇关于多个容器POD中的一个容器进程崩溃会发生什么情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆