--pod-infra-container-image是什么意思? [英] What is --pod-infra-container-image meant for?

查看:162
本文介绍了--pod-infra-container-image是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

kubernetes中的pod-infra-container-image的用途是什么?

官方文档只说:

每个Pod中将使用其网络/ipc命名空间容器的图像.(默认为"gcr.io/google_containers/pause-amd64:3.0")

但是我不完全了解它的作用以及它的详细工作原理.

解决方案

使用暂停容器(对-pod-infra-container 标志选择的图像进行镜像),以便可以启动多个容器在pod中,同时共享资源.它几乎什么都不做,除非您有充分的理由将其替换为自定义内容,否则就不应该这样做.它主要调用 pause 系统调用(因此得名),但它也具有重要的功能,即具有PID 1并确保没有僵尸进程被保留.

关于此主题的非常完整的文章

What is purpose of pod-infra-container-image in kubernetes?

Official documentation says only:

The image whose network/ipc namespaces containers in each pod will use. (default "gcr.io/google_containers/pause-amd64:3.0")

but I don't understand exactly what it does and how it works in detail.

解决方案

The pause container, which image the --pod-infra-container flag selects, is used so that multiple containers can be launched in a pod, while sharing resources. It mostly does nothing, and unless you have a very good reason to replace it with something custom, you shouldn't. It mostly invokes the pause system call (hence its name) but it also performs the important function of having PID 1 and making sure no zombie processes are kept around.

An extremely complete article on the subject can be found here, from where I also shamelessly stole the following picture which illustrates where the pause container lives:

这篇关于--pod-infra-container-image是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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