Why using pods and not directly containers in an OpenShift V3 environment Why using pods and not directly containers in an OpenShift V3 environment kubernetes kubernetes

Why using pods and not directly containers in an OpenShift V3 environment


There are many cases where our users want to run pods with multiple containers within OpenShift. A common use-case for running multiple containers is where a pod has a 'primary' container that does some job, and a 'side-car' container that does something like write logs to a logging agent.

The motivation for pods is twofold -- to make it easier to share resources between containers, and to enable deploying and replicating groups of containers that share resources. You can read more about them in the user-guide.

The reason we still use a Pod when only a single container is that containers do not have all the notions that are attached to pods. For example, pods have IP addresses. Containers do not -- they share the IP address associated with the pod's network namespace.

Hope that helps. Let me know if you'd like more clarification, or we can discuss on slack.