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:
- Expose your
frontend
application to the public network. - Protect your
database
container in a private network.
Prerequisites
- You are using the Podman container engine.
- Your containers, such as
database
andfrontend
, running or stopped, are available on the Containers page. - The
frontend
container is configured to access the service exposed by thedatabase
container on localhost, such aslocalhost:6379
.
Procedure
- Go to Containers.
- Click the checkbox in the container line for your containers, such as
database
andfrontend
. - Click .
- In the Copy containers to a pod screen:
- Name of the pod: enter your pod name, such as
my-pod
. - All selected ports will be exposed:
- Select
frontend
. - Clear
database
.
- Select
- Name of the pod: enter your pod name, such as
- Click Create Pod.
Verification
- Go to Pods.
- Click your pod, such as
my-pod
. - Go to Logs: see the combined logs from the two containers.
- Go to Summary: see the containers.
- Click
frontend-podified
. - Click .
- Your browser opens the service exposed by your
frontend-podified
container. - Go to Containers: see the running containers.