Skip to main content

Pods

I always thought a Kubernetes Pod wraps one or more containers. This isn't true.

A pod is purely logical. It doesn't exist at all. The only thing that exists is the pause container. The kubelet creates it as the root of the pod.

Preparation

Pod preparation is like container preparation. The main difference is the order. It first creates the pause container with all the namespaces. Then it creates the real containers using those namespaces.

pod-creation-process

Pod information in manifests

Manifests hold two sets of information. One is for the whole pod. The rest is for the app container. The pod information is used to set up the pause container.

PVC and Volume Mount

This is why the PVC information is at the pod level. The PVC must be prepared and made available on the pause container. The volume mount is at the main container level. It's then mounted from the mount namespace built with the pause container.