apiVersion: v1 
kind: Pod 
metadata:
  name: nginx-empty-dir-volume-pod
spec: 
  containers: 
  - name: nginx 
    image: nginx:alpine 
    volumeMounts: 
      - name: empty-dir-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: empty-dir-volume 
        mountPath: /html 
  volumes: 
  - name: empty-dir-volume 
    emptyDir: {} #lifecycle tied to Pod
    
# kubectl apply -f nginx-alpine-emptyDir.pod.yml
# kubectl port-forward nginx-alpine-volume 8080:80