Chapter 8. Working with pods


Group related containers together into a pod to share namespaces and resources. Pods allow you to manage multiple containers as a single unit.

Containers are the smallest manageable unit with Podman, Skopeo, and Buildah. A Podman pod, similar to a Kubernetes pod, groups one or more containers. Pods are the smallest compute units in OpenShift or Kubernetes. Each Podman pod includes an infra container, which manages namespaces and allows other containers to connect, start, and stop, keeping the pod running. The default infra container on the registry.access.redhat.com/ubi10/pause image.

8.1. Creating pods

Create a new pod using the podman pod create command. You can then add containers to this pod, allowing them to share network and storage resources.

Prerequisites

  • The container-tools meta-package is installed.

Procedure

  1. Create an empty pod:

    $ podman pod create --name mypod
    223df6b390b4ea87a090a4b5207f7b9b003187a6960bd37631ae9bc12c433aff
    The pod is in the initial state Created.

    The pod is in the initial state Created.

  2. Optional: List all pods:

    $ podman pod ps
    POD ID         NAME    STATUS    CREATED                  # OF CONTAINERS   INFRA ID
    223df6b390b4   mypod   Created   Less than a second ago   1                 3afdcd93de3e

    Notice that the pod has one container in it.

  3. Optional: List all pods and containers associated with them:

    $ podman ps -a --pod
    CONTAINER ID  IMAGE                 COMMAND  CREATED                 STATUS   PORTS  NAMES               POD
    3afdcd93de3e  registry.access.redhat.com/ubi10/pause            Less than a second ago  Created         223df6b390b4-infra  223df6b390b4

    You can see that the pod ID from podman ps command matches the pod ID in the podman pod ps command. The default infra container is based on the registry.access.redhat.com/ubi10/pause image.

  4. Run a container named myubi in the existing pod named mypod:

    $ podman run -dt --name myubi --pod mypod registry.access.redhat.com/ubi10/ubi /bin/bash
    5df5c48fea87860cf75822ceab8370548b04c78be9fc156570949013863ccf71
  5. Optional: List all pods:

    $ podman pod ps
    POD ID         NAME    STATUS    CREATED                  # OF CONTAINERS   INFRA ID
    223df6b390b4   mypod   Running   Less than a second ago   2                 3afdcd93de3e

    You can see that the pod has two containers in it.

  6. Optional: List all pods and containers associated with them:

    $ podman ps -a --pod
    CONTAINER ID  IMAGE                                       COMMAND    CREATED                 STATUS                     PORTS  NAMES               POD
    5df5c48fea87  registry.access.redhat.com/ubi10/ubi:latest  /bin/bash  Less than a second ago  Up Less than a second ago         myubi               223df6b390b4
    3afdcd93de3e  registry.access.redhat.com/ubi10/pause                                   Less than a second ago  Up Less than a second ago         223df6b390b4-infra  223df6b390b4

8.2. Displaying pod information

View details about your pods, including status and associated containers. This helps you monitor the health and configuration of your pod groups.

Note

Beginning with Podman v5.0.0, pod output is always a JSON array, regardless of the number of pods.

For more information, see the podman-pod-top(1), podman-pod-stats(1), and podman-pod-inspect(1) man pages on your system.

Prerequisites

  • The container-tools meta-package is installed.
  • The pod has been created. For details, see section Creating pods.

Procedure

  • Display active processes running in a pod:

    • To display the running processes of containers in a pod, enter:

      $ podman pod top mypod
      USER   PID   PPID   %CPU    ELAPSED         TTY     TIME   COMMAND
      0      1     0      0.000   24.077433518s   ?       0s     /pause
      root   1     0      0.000   24.078146025s   pts/0   0s     /bin/bash
    • To display a live stream of resource usage stats for containers in one or more pods, enter:

      $ podman pod stats -a --no-stream
      ID             NAME              CPU %   MEM USAGE / LIMIT   MEM %   NET IO    BLOCK IO   PIDS
      a9f807ffaacd   frosty_hodgkin    --      3.092MB / 16.7GB    0.02%   -- / --   -- / --    2
      3b33001239ee   sleepy_stallman   --      -- / --             --      -- / --   -- / --    --
    • To display information describing the pod, enter:

      $ podman pod inspect --format json <POD_ID_1> <POD_ID_2> <POD_ID_3>
      [
        {
            "CgroupParent": "/libpod_parent",
            "Containers": [
              {
                "ID": "...",
                "State": "..."
              }
            ],
            "Created": "2025-10-16T12:00:00.000000000Z",
            "ID": "673f326c9f69b0d24c0847f97a544c79532817d2a713917812f865f1e8e52a8a",
            "InfraContainerID": "...",
            "Labels": {},
            "Name": "web_pod",
            "State": "Running",
          },
          {
            "CgroupParent": "/libpod_parent",
            "Containers": [
              {
                "ID": "...",
                "State": "..."
              }
            ],
            "Created": "2025-10-16T12:01:00.000000000Z",
            "ID": "a1b2c3d4e5f678901234567890abcdef1234567890abcdef1234567890abcdef",
            "InfraContainerID": "...",
            "Labels": {},
            "Name": "db_pod",
            "State": "Running",
          }
      ]

      You can see information about containers in the pod.

8.3. Stopping pods

Stop an entire pod and all its contained containers by using the podman pod stop command. This helps ensure that all related services within the pod terminate together.

Prerequisites

  • The container-tools meta-package is installed.
  • The pod has been created. For details, see section Creating pods.

Procedure

  1. Stop the pod mypod:

    $ podman pod stop mypod
  2. Optional: List all pods and containers associated with them:

    $ podman ps -a --pod
    CONTAINER ID  IMAGE                               COMMAND    CREATED             STATUS                    PORTS   NAMES               POD ID        PODNAME
    5df5c48fea87  registry.redhat.io/ubi10/ubi:latest  /bin/bash  About a minute ago  Exited (0) 7 seconds ago          myubi               223df6b390b4  mypod
    
    3afdcd93de3e  registry.access.redhat.com/10/pause                           About a minute ago  Exited (0) 7 seconds ago          8a4e6527ac9d-infra  223df6b390b4  mypod

    You can see that the pod mypod and container myubi are in "Exited" status.

8.4. Removing pods

Delete stopped pods by using the podman pod rm command. This removes the pod definition and all associated containers from your system.

Prerequisites

  • The container-tools meta-package is installed.
  • The pod has been created. For details, see section Creating pods.
  • The pod has been stopped. For details, see section Stopping pods.

Procedure

  1. Remove the pod mypod, type:

    $ podman pod rm mypod
    223df6b390b4ea87a090a4b5207f7b9b003187a6960bd37631ae9bc12c433aff

    Note that removing the pod automatically removes all containers inside it.

  2. Optional: Check that all containers and pods were removed:

    $ podman ps
    $ podman pod ps

    For more information, see the podman-pod-rm(1) man page on your system.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top