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
frontendapplication to the public network. - Protect your
databasecontainer in a private network.
Prerequisites
- You are using the Podman container engine.
- Your containers, such as
databaseandfrontend, running or stopped, are available on the Containers page. - The
frontendcontainer is configured to access the service exposed by thedatabasecontainer on localhost, such aslocalhost:6379.
Procedure
- Go to Containers.
- Click the checkbox in the container line for your containers, such as
databaseandfrontend. - 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-podifiedcontainer. - Go to Containers: see the running containers.