Skip to content

Commit 6ab5958

Browse files
Merge pull request #26732 from shiavm006/docs-pod-create-examples-only
docs: add examples with resource limits and mounts
2 parents 9f7af81 + f96eccb commit 6ab5958

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/source/markdown/podman-pod-create.1.md.in

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,38 @@ Create a pod on two networks.
227227
$ podman pod create --network net1:ip=10.89.1.5 --network net2:ip=10.89.10.10
228228
```
229229

230+
Create a pod with shared CPU and memory limits for all containers.
231+
```
232+
$ podman pod create --cpus=2 --memory=512m mypod
233+
```
234+
235+
Create a pod with shared volume mounts accessible to all containers.
236+
```
237+
$ podman pod create --volume /host/path:/container/path:Z mypod
238+
```
239+
240+
Create a pod with shared resource limits and volume mounts for all containers.
241+
```
242+
$ podman pod create --volume /data:/data:Z --volume /config:/etc/config:ro --cpus=1.5 --memory=1g --cpu-shares=512 mypod
243+
```
244+
245+
Create a pod with shared device access and resource limits.
246+
```
247+
$ podman pod create --device /dev/sda:/dev/sda:rw --cpus=4 --memory=2g --blkio-weight=500 mypod
248+
```
249+
250+
Create a pod with shared CPU set limits and volumes from another container that will be shared to all containers in the pod.
251+
```
252+
$ podman pod create --cpuset-cpus=0,2 --volumes-from=source-container --memory=1g mypod
253+
```
254+
255+
Create a pod with shared resources and add containers to it.
256+
```
257+
$ podman pod create --cpus=2 --memory=1g --volume /data:/data:Z mypod
258+
$ podman create --pod mypod nginx
259+
$ podman create --pod mypod redis
260+
```
261+
230262
## SEE ALSO
231263
**[podman(1)](podman.1.md)**, **[podman-pod(1)](podman-pod.1.md)**, **[podman-kube-play(1)](podman-kube-play.1.md)**, **containers.conf(1)**, **[cgroups(7)](https://man7.org/linux/man-pages/man7/cgroups.7.html)**
232264

0 commit comments

Comments
 (0)