sh
kubectl apply -n tandem-6sjiad -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: handoff
spec:
volumes:
- name: shared
emptyDir: {}
containers:
- name: writer
image: busybox
command: ["sh", "-c", "echo from the writer > /work/note.txt; sleep 3600"]
volumeMounts:
- name: shared
mountPath: /work
- name: reader
image: busybox
command: ["sleep", "3600"]
volumeMounts:
- name: shared
mountPath: /data
EOFRead /data/note.txt from reader. Write a second file from reader and list /work from writer. Then delete the Pod, apply the manifest again, and list the directory once more.