mirror of
https://github.com/containers/podman.git
synced 2025-07-02 00:30:00 +08:00
Fix up example description of podman-pod commands
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -14,20 +14,16 @@ was an issue accessing the local storage.
|
|||||||
|
|
||||||
## EXAMPLES
|
## EXAMPLES
|
||||||
|
|
||||||
Check if a pod called `web` exists in local storage (the pod does actually exist).
|
Check if specified pod exists in local storage (the pod does actually exist):
|
||||||
```
|
```
|
||||||
$ sudo podman pod exists web
|
$ sudo podman pod exists web; echo $?
|
||||||
$ echo $?
|
|
||||||
0
|
0
|
||||||
$
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Check if a pod called `backend` exists in local storage (the pod does not actually exist).
|
Check if specified pod exists in local storage (the pod does not actually exist):
|
||||||
```
|
```
|
||||||
$ sudo podman pod exists backend
|
$ sudo podman pod exists backend; echo $?
|
||||||
$ echo $?
|
|
||||||
1
|
1
|
||||||
$
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## SEE ALSO
|
## SEE ALSO
|
||||||
|
@ -60,6 +60,8 @@ Valid placeholders for the Go template are listed below:
|
|||||||
@@option latest
|
@@option latest
|
||||||
|
|
||||||
## EXAMPLE
|
## EXAMPLE
|
||||||
|
|
||||||
|
Inspect specified pod:
|
||||||
```
|
```
|
||||||
# podman pod inspect foobar
|
# podman pod inspect foobar
|
||||||
[
|
[
|
||||||
|
@ -20,27 +20,27 @@ Sends signal to all containers associated with a pod.
|
|||||||
|
|
||||||
## EXAMPLE
|
## EXAMPLE
|
||||||
|
|
||||||
Kill pod with a given name
|
Kill pod with a given name:
|
||||||
```
|
```
|
||||||
podman pod kill mywebserver
|
podman pod kill mywebserver
|
||||||
```
|
```
|
||||||
|
|
||||||
Kill pod with a given ID
|
Kill pod with a given ID:
|
||||||
```
|
```
|
||||||
podman pod kill 860a4b23
|
podman pod kill 860a4b23
|
||||||
```
|
```
|
||||||
|
|
||||||
Terminate pod by sending `TERM` signal
|
Terminate pod by sending `TERM` signal:
|
||||||
```
|
```
|
||||||
podman pod kill --signal TERM 860a4b23
|
podman pod kill --signal TERM 860a4b23
|
||||||
```
|
```
|
||||||
|
|
||||||
Kill the latest pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
|
Kill the latest pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines):
|
||||||
```
|
```
|
||||||
podman pod kill --latest
|
podman pod kill --latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Terminate all pods by sending `KILL` signal
|
Terminate all pods by sending `KILL` signal:
|
||||||
```
|
```
|
||||||
podman pod kill --all
|
podman pod kill --all
|
||||||
```
|
```
|
||||||
|
@ -40,7 +40,7 @@ To view a pod's logs:
|
|||||||
podman pod logs -t podIdorName
|
podman pod logs -t podIdorName
|
||||||
```
|
```
|
||||||
|
|
||||||
To view logs of a specific container on the pod
|
To view logs of a specific container on the pod:
|
||||||
```
|
```
|
||||||
podman pod logs -c ctrIdOrName podIdOrName
|
podman pod logs -c ctrIdOrName podIdOrName
|
||||||
```
|
```
|
||||||
|
@ -21,12 +21,12 @@ Instead of providing the pod name or ID, pause the last created pod. (This optio
|
|||||||
|
|
||||||
## EXAMPLE
|
## EXAMPLE
|
||||||
|
|
||||||
Pause a pod with a given name
|
Pause a pod with a given name:
|
||||||
```
|
```
|
||||||
podman pod pause mywebserverpod
|
podman pod pause mywebserverpod
|
||||||
```
|
```
|
||||||
|
|
||||||
Pause a pod with a given ID
|
Pause a pod with a given ID:
|
||||||
```
|
```
|
||||||
podman pod pause 860a4b23
|
podman pod pause 860a4b23
|
||||||
```
|
```
|
||||||
|
@ -24,26 +24,26 @@ Instead of providing the pod name or ID, restart the last created pod. (This opt
|
|||||||
|
|
||||||
## EXAMPLE
|
## EXAMPLE
|
||||||
|
|
||||||
Restart pod with a given name
|
Restart pod with a given name:
|
||||||
```
|
```
|
||||||
podman pod restart mywebserverpod
|
podman pod restart mywebserverpod
|
||||||
cc8f0bea67b1a1a11aec1ecd38102a1be4b145577f21fc843c7c83b77fc28907
|
cc8f0bea67b1a1a11aec1ecd38102a1be4b145577f21fc843c7c83b77fc28907
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart multiple pods with given IDs
|
Restart multiple pods with given IDs:
|
||||||
```
|
```
|
||||||
podman pod restart 490eb 3557fb
|
podman pod restart 490eb 3557fb
|
||||||
490eb241aaf704d4dd2629904410fe4aa31965d9310a735f8755267f4ded1de5
|
490eb241aaf704d4dd2629904410fe4aa31965d9310a735f8755267f4ded1de5
|
||||||
3557fbea6ad61569de0506fe037479bd9896603c31d3069a6677f23833916fab
|
3557fbea6ad61569de0506fe037479bd9896603c31d3069a6677f23833916fab
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart the last created pod
|
Restart the last created pod:
|
||||||
```
|
```
|
||||||
podman pod restart --latest
|
podman pod restart --latest
|
||||||
3557fbea6ad61569de0506fe037479bd9896603c31d3069a6677f23833916fab
|
3557fbea6ad61569de0506fe037479bd9896603c31d3069a6677f23833916fab
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart all pods
|
Restart all pods:
|
||||||
```
|
```
|
||||||
podman pod restart --all
|
podman pod restart --all
|
||||||
19456b4cd557eaf9629825113a552681a6013f8c8cad258e36ab825ef536e818
|
19456b4cd557eaf9629825113a552681a6013f8c8cad258e36ab825ef536e818
|
||||||
|
@ -32,28 +32,28 @@ The --force option must be specified to use the --time option.
|
|||||||
|
|
||||||
## EXAMPLE
|
## EXAMPLE
|
||||||
|
|
||||||
Remove pod with a given name
|
Remove pod with a given name:
|
||||||
```
|
```
|
||||||
podman pod rm mywebserverpod
|
podman pod rm mywebserverpod
|
||||||
```
|
```
|
||||||
|
|
||||||
Remove multiple pods with given names and/or IDs
|
Remove multiple pods with given names and/or IDs:
|
||||||
```
|
```
|
||||||
podman pod rm mywebserverpod myflaskserverpod 860a4b23
|
podman pod rm mywebserverpod myflaskserverpod 860a4b23
|
||||||
```
|
```
|
||||||
|
|
||||||
Forcefully remove pod with a given ID
|
Forcefully remove pod with a given ID:
|
||||||
```
|
```
|
||||||
podman pod rm -f 860a4b23
|
podman pod rm -f 860a4b23
|
||||||
```
|
```
|
||||||
|
|
||||||
Forcefully remove all pods
|
Forcefully remove all pods:
|
||||||
```
|
```
|
||||||
podman pod rm -f -a
|
podman pod rm -f -a
|
||||||
podman pod rm -fa
|
podman pod rm -fa
|
||||||
```
|
```
|
||||||
|
|
||||||
Remove pod using ID specified in a given file
|
Remove pod using ID specified in a given file:
|
||||||
```
|
```
|
||||||
podman pod rm --pod-id-file /path/to/id/file
|
podman pod rm --pod-id-file /path/to/id/file
|
||||||
```
|
```
|
||||||
|
@ -22,27 +22,27 @@ Starts all pods
|
|||||||
|
|
||||||
## EXAMPLE
|
## EXAMPLE
|
||||||
|
|
||||||
Start pod with a given name
|
Start pod with a given name:
|
||||||
```
|
```
|
||||||
podman pod start mywebserverpod
|
podman pod start mywebserverpod
|
||||||
```
|
```
|
||||||
|
|
||||||
Start pods with given IDs
|
Start pods with given IDs:
|
||||||
```
|
```
|
||||||
podman pod start 860a4b23 5421ab4
|
podman pod start 860a4b23 5421ab4
|
||||||
```
|
```
|
||||||
|
|
||||||
Start the latest pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
|
Start the latest pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines):
|
||||||
```
|
```
|
||||||
podman pod start --latest
|
podman pod start --latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Start all pods
|
Start all pods:
|
||||||
```
|
```
|
||||||
podman pod start --all
|
podman pod start --all
|
||||||
```
|
```
|
||||||
|
|
||||||
Start pod using ID specified in a given file
|
Start pod using ID specified in a given file:
|
||||||
```
|
```
|
||||||
podman pod start --pod-id-file /path/to/id/file
|
podman pod start --pod-id-file /path/to/id/file
|
||||||
```
|
```
|
||||||
|
@ -44,6 +44,7 @@ When using a Go template, precede the format with `table` to print headers.
|
|||||||
|
|
||||||
## EXAMPLE
|
## EXAMPLE
|
||||||
|
|
||||||
|
List statistics about all pods without streaming:
|
||||||
```
|
```
|
||||||
# podman pod stats -a --no-stream
|
# podman pod stats -a --no-stream
|
||||||
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS
|
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS
|
||||||
@ -51,12 +52,14 @@ a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -
|
|||||||
3b33001239ee sleepy_stallman -- -- / -- -- -- / -- -- / -- --
|
3b33001239ee sleepy_stallman -- -- / -- -- -- / -- -- / -- --
|
||||||
```
|
```
|
||||||
|
|
||||||
|
List statistics about specified pod without streaming:
|
||||||
```
|
```
|
||||||
# podman pod stats --no-stream a9f80
|
# podman pod stats --no-stream a9f80
|
||||||
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS
|
ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS
|
||||||
a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2
|
a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
List statistics about specified pod in JSON format without streaming:
|
||||||
```
|
```
|
||||||
# podman pod stats --no-stream --format=json a9f80
|
# podman pod stats --no-stream --format=json a9f80
|
||||||
[
|
[
|
||||||
@ -73,6 +76,7 @@ a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- --
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
List selected statistics formatted in a table about specified pod:
|
||||||
```
|
```
|
||||||
# podman pod stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" 6eae
|
# podman pod stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" 6eae
|
||||||
ID NAME MEM USAGE / LIMIT
|
ID NAME MEM USAGE / LIMIT
|
||||||
|
@ -21,12 +21,12 @@ Instead of providing the pod name or ID, unpause the last created pod. (This opt
|
|||||||
|
|
||||||
## EXAMPLE
|
## EXAMPLE
|
||||||
|
|
||||||
Unpause pod with a given name
|
Unpause pod with a given name:
|
||||||
```
|
```
|
||||||
podman pod unpause mywebserverpod
|
podman pod unpause mywebserverpod
|
||||||
```
|
```
|
||||||
|
|
||||||
Unpause pod with a given ID
|
Unpause pod with a given ID:
|
||||||
```
|
```
|
||||||
podman pod unpause 860a4b23
|
podman pod unpause 860a4b23
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user