pod 中的容器可读取、写入到 emptyDir 中相同文件
pod 删除时 emptyDir 被删除
apiVersion: v1kind: Podmetadata:name: emptydir-podspec:volumes:- name: webrootemptyDir: {}containers:- name: emptydir-pod-nginximage: nginxvolumeMounts:- mountPath: /usr/share/nginx/htmlname: webroot- name: emptydir-pod-busyboximage: busyboxcommand: ["/bin/sh","-c",'while true;do echo "<h2>`date`</h2>" > /data/webroot/index.html; sleep 3; done']volumeMounts:- mountPath: /data/webroot/name: webroot
