<p>We have containers in docker as smallest unit and we have pods as smallest unit in kubernetes. The safe practice is that we should keep one container in one pod. So it is one and the same i.e pods and containers acts same (One container in one pod). Then why pods where created if one container is to be put in one pod. We could have used containers itself. </p>

<p>The reason behind using pod rather than directly container is that kubernetes requires more information to orchestrate the containers like <code>restart policy</code>, <code>liveness probe</code>, <code>readiness probe</code>. A <code>liveness probe</code> defines that container inside the pods is alive or not, <code>restart policy</code> defines the what to do with container when it failed. A <code>readiness probe</code> defines that container is ready to start serving.</p>

<p>So, Instead of adding those properties to the existing container, kubernetes had decided to write the wrapper on containers with all the necessary additional information.</p>

<p>Also, Kubernetes supports the multi-container pod which is mainly requires for the <code>sidecar containers</code> mainly log or data collector or proxies for the main container. Another advantage of multi-container pod is they can have very tightly coupled application container together sharing the same data, same network namespace and same IPC namespace which would not be possible if they choose for directly using container without any wrapper around it.</p>

<p>Following is very nice article on this:</p>

<p><a href="https://www.mirantis.com/blog/multi-container-pods-and-container-communication-in-kubernetes/" rel="nofollow noreferrer">https://www.mirantis.com/blog/multi-container-pods-and-container-communication-in-kubernetes/</a></p>

<p>Hope this gives you brief idea.</p>
