apiVersion: v1
kind: Pod
metadata:
  name: shared-volume
  labels:
    app: shared-volume
spec:
  containers:
    - name:  writer
      image: busybox
      command:  ["sh","-c", "while true; do date >> /srv/log ; sleep 1 ; done" ]
      volumeMounts:
        - mountPath: /srv/
          name: shareddir
    - name:  reader
      image: busybox
      command: ["tail","-f","/srv/log"]
      volumeMounts:
        - mountPath: /srv/
          name: shareddir
  volumes:
    - name: shareddir
      emptyDir: {}
