A Podman pod is a group of one or more containers that share a network namespace, IPC namespace, and (optionally) other Linux namespaces — similar to a Kubernetes Pod. Containers inside a pod can communicate overDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Pratyay360/podman-ts/llms.txt
Use this file to discover all available pages before exploring further.
localhost and share the same IP address. Pods are useful when you need to co-locate tightly coupled processes, such as an application container and a sidecar, without requiring a full orchestrator.
PodsManager is accessible via client.pods on any PodmanClient instance.
PodsManager methods
create
Pod instance. The options object is serialized directly as the JSON request body, so any field accepted by the Podman POST /pods/create endpoint can be passed (e.g. infraImage, portmappings, shareNamespaces).
Name for the pod. Must be unique on the host.
Additional pod creation fields forwarded directly to the Podman API body (e.g.
{ portmappings: [{ container_port: 80, host_port: 8080, protocol: "tcp" }] }).list
Key/value filters (e.g.
{ name: "web-pod", status: "running" }).get
Pod instance. Throws NotFound if the pod does not exist.
exists
true if a pod with the given ID or name exists, false otherwise.
remove
NotFound if the pod does not exist.
Stop and remove a running pod and all of its containers.
prune
stats
Include stats for all pods, not just running ones.
Pod instance methods
APod object is returned by create(), get(), and each element of list().
Lifecycle
| Method | Signature | Description |
|---|---|---|
start | (): Promise<void> | Start the pod and all of its containers. |
stop | (options?: { timeout?: number }): Promise<void> | Stop the pod. Optional timeout (seconds) before force kill. |
restart | (): Promise<void> | Restart the pod. |
kill | (signal?: string | number): Promise<void> | Send a signal to all containers in the pod. |
pause | (): Promise<void> | Pause all containers in the pod. |
unpause | (): Promise<void> | Unpause a paused pod. |
remove | (options?: { force?: boolean }): Promise<void> | Remove the pod. |
Inspection
| Method | Signature | Description |
|---|---|---|
top | (options?: { psArgs?: string }): Promise<Record<string, unknown>> | List processes running in the pod’s containers. |
reload | (): Promise<void> | Refresh pod.attrs from the API. |
pod.id, pod.name.
Pod instances do not expose an inspect() shortcut. To get full inspect data, call client.pods.get(pod.id) which re-fetches from the API, or call pod.reload() to update the cached pod.attrs in place.