<p>What is purpose of pod-infra-container-image in kubernetes?</p>

<p>Official documentation says only: </p>

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

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

<p>The pause container, which image the <code>--pod-infra-container</code> 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 <code>pause</code> 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.</p>

<p>An extremely complete article on the subject <a href="https://www.ianlewis.org/en/almighty-pause-container" rel="noreferrer">can be found here</a>, from where I also shamelessly stole the following picture which illustrates where the pause container lives:</p>

<p><a href="https://i.stack.imgur.com/oaF5L.png" rel="noreferrer"><img src="https://i.stack.imgur.com/oaF5L.png" alt="enter image description here"></a></p>
