Skip to main content

Creating a pod from selected containers

With Podman Desktop, you can create a pod from your selected containers, and run the pod on the Podman container engine.

Consider running containers in a pod to:

  1. Expose your frontend application to the public network.
  2. Protect your database container in a private network.

Prerequisites

  • You are using the Podman container engine.
  • Your containers, such as database and frontend, running or stopped, are available on the Containers page.
  • The frontend container is configured to access the service exposed by the database container on localhost, such as localhost:6379.

Procedure

  1. Go to Containers.
  2. Click the checkbox in the container line for your containers, such as database and frontend.
  3. Click .
  4. In the Copy containers to a pod screen:
    1. Name of the pod: enter your pod name, such as my-pod.
    2. All selected ports will be exposed:
      1. Select frontend.
      2. Clear database.
  5. Click Create Pod.

Verification

  1. Go to Pods.
  2. Click your pod, such as my-pod.
  3. Go to Logs: see the combined logs from the two containers.
  4. Go to Summary: see the containers.
  5. Click frontend-podified.
  6. Click .
  7. Your browser opens the service exposed by your frontend-podified container.
  8. Go to Containers: see the running containers.