YAML is a human-readable, structured data-serialization format used to define Kubernetes resources and compose applications. Its declarative structure replaces complex multi-container command lines with a reusable file. section 8.0 section 9.4
YAML connects container workflows to several operational tools:
- Kubernetes YAML can create containers and pods from Podman-managed definitions and can launch them with podman play kube. section 8.0
- Compose YAML orchestrates multiple containers on one node, while Kubernetes targets orchestration across multiple nodes. section 9.4
- Podman can run compose YAML through its compatible REST API, including rootless containers. section 9.4
A compose YAML definition
A docker-compose.yaml file can define an application image, bind mount, named volume, and port mapping: service myapp uses quay.io/rhatdan/myimage:latest, mounts ./html at /var/www/html, mounts myapp_vol at /vol, and maps port 8080 to 80. section 9.4
cat > docker-compose.yaml << _EOF
version: "3.7"
services:
myapp:
image: quay.io/rhatdan/myimage:latest
volumes:
- ./html:/var/www/html
- myapp_vol:/vol
ports:
- 8080:80
volumes:
myapp_vol: {}
_EOF
Inspect a complete compose YAML file showing service, image, volumes, ports, and named-volume declarations. section 9.4















