apiVersion: v1
kind: Pod
metadata:
  name: efs-writer
  namespace: storage
spec:
  containers:
  - name: efs-writer
    image: busybox
    command: ["/bin/sh"]    
    args: ["-c", "while true; do echo $POD_NAME.$POD_NAMESPACE - $(date -u) >> /shared/out.txt; sleep 5; done"]
    env:
    - name: POD_NAME
      valueFrom:
        fieldRef:
          fieldPath: metadata.name    
    - name: POD_NAMESPACE
      valueFrom:
        fieldRef:
          fieldPath: metadata.namespace           
    volumeMounts:
    - name: efs-pvc
      mountPath: /shared
  volumes:
  - name: efs-pvc
    persistentVolumeClaim:
      claimName: efs-storage-claim
