apiVersion: v1
kind: Pod
metadata:
  name: nginx-volume-test
  labels:
    app: nginx-volume-test
spec:
  volumes: # define initial volume named "html" being an empty directory
    - name: html
      emptyDir: {}
  containers:
    - name: nginx
      image: nginx:alpine
      volumeMounts:
        - name: html # must match name of defined volume
          mountPath: /usr/share/nginx/html
          readOnly: true
    - name: html-updater
      image: alpine
      command: ["/bin/sh", "-c"]
      args:
        - while true; do date >> /html/index.html; sleep 10; done
      volumeMounts:
        - name: html  # must match name of defined volume
          mountPath: /html
