A pod groups one or more containers that work together for a common purpose. Its containers share storage, networking resources, namespaces, cgroups, and—on SELinux systems—SELinux labels. section 1.3.8 section 4.0
Podman uses pods to combine separately packaged services while preserving concrete sharing boundaries:
- Containers in a pod share a network namespace, so a published port belongs to the pod and only one process can listen on that port. section 4.2
- A pod volume is inherited by containers that join the pod; shared SELinux labels allow those containers to access the volume together. section 4.2
- Containers may use different images or distributions, because they share the host kernel rather than container images. section 4.3
- Podman manages the pod through an infra container that holds namespaces and supports the pod's shared configuration. section 4.3
Web application with a sidecar
Create a pod with a shared port and HTML volume using `podman pod create -p 8080:8080 --name mypod --volume ./html:/var/www/html:z`. Add the application with `podman create --pod mypod --name myapp quay.io/rhatdan/myimage`, then add a `ubi8` sidecar that runs `/var/www/html/time.sh`. Starting `mypod` launches the infra container, web application, and timestamp-writing sidecar; the application serves changes made through the shared volume at `http://localhost:8080`. section 4.2 section 4.3 section 4.4
$ podman pod create -p 8080:8080 --name mypod --volume ./html:/var/www/html:z 790fefe97b280e5f67c526e3a421e9c9f958cf5a98f3709373ef1afd91965955
Use the pod creation command as the starting point for a shared network and volume configuration. section 4.2














