Pods is now the minimum deployment unit for containers in Kubernetes. Similar support is provided by
podman-compose works almost identically. But this is a good concept in terms of convenience, security and later migration to
The specific architecture is as follows.
To use the
pod function of
podman, make sure that
catatonit is installed in advance.
Create a pod
sudo podman pod create -n test-pod
List all pods
∴ sudo podman pod list
POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS
850580d6a80b test-pod Created About a minute ago 5b40275320b0 1
Add a container to a pod
Adds a container of
top to the
test-pod created earlier.
sudo podman run -dt --pod test-pod docker.io/library/alpine:latest top
pod also supports commands such as
ps as follows.
$ sudo podman pod
podman pod - Manage container pods.
Pods are a group of one or more containers sharing the same network, pid and ipc namespaces.
podman pod command [command options] [arguments...]
create Create a new empty pod
exists Check if a pod exists in local storage
inspect displays a pod configuration
kill Send the specified signal or SIGKILL to containers in pod
pause Pause one or more pods
ps, ls, list List pods
restart Restart one or more pods
rm Remove one or more pods
start Start one or more pods
stats Display percentage of CPU, memory, network I/O, block I/O and PIDs for containers in one or more pods
stop Stop one or more pods
top Display the running processes of containers in a pod
unpause Unpause one or more pods
--help, -h show help
With the above command, you can easily start and stop the containers that need to be put together in a pod to control the network, etc. Before
deploy.yaml is not supported, we may expect
podman-compose to improve the function as soon as possible. Otherwise, the current situation can only be used in some limited container cases.
But in the latest version of
4.0+, you can use this
systemd. This makes it possible to use more scenarios.