Tous les labs

Build an init + sidecar Pod

Advanced ~28 mink8s

Create Pod web-composite: an init container writes initial HTML to a shared volume, nginx serves it, and a sidecar appends timestamps to a shared log.

Objectifs
  • Use emptyDir volumes html and logs
  • Init container writes /work/index.html
  • nginx mounts html at /usr/share/nginx/html
  • sidecar writes timestamps to logs
Étapes suggérées
  1. Init and app containers use the same volume name with different mount paths.
  2. Use busybox:1.36 for init and sidecar.
  3. Keep the sidecar command running.
Indices
Voir la solution
# Complete the manifest with one init container and two app containers, sharing emptyDir volumes.