Pod: A Collection Of Containers
Relationship between multiple containers is a decent way to understand what a pod
in the world of k8s
is. As you probably know containers provide operating-system-level virtualization. In Linux this virtualization is achieved via namespaces. By default, all containers within a pod
share network
, and ipc
namespaces. In v1.13
you can also set the shareProcessNamespace
to share the process
namespace between containers in the same pod. See here for more info on this.
There is a good article here with some examples for communication between containers of the same pod leveraging the shared namespaces (and also volumes).
Also see this proposal by @brandandburns to make a pod
a first class object in the docker API.
Written on February 28, 2019