# 查看 分区文件
[root@k8s-node-28 cephrbd]# kubectl exec -it nginx-dm-1697116629-j4m1g -- df -h
Filesystem Size Used Available Use% Mounted on
overlay 115.2G 4.9G 104.4G 4% /
tmpfs 62.8G 0 62.8G 0% /dev
tmpfs 62.8G 0 62.8G 0% /sys/fs/cgroup
/dev/mapper/centos-root
115.2G 4.9G 104.4G 4% /dev/termination-log
/dev/mapper/centos-root
115.2G 4.9G 104.4G 4% /etc/resolv.conf
/dev/mapper/centos-root
115.2G 4.9G 104.4G 4% /etc/hostname
/dev/mapper/centos-root
115.2G 4.9G 104.4G 4% /etc/hosts
shm 64.0M 0 64.0M 0% /dev/shm
/dev/rbd0 975.9M 1.3M 907.4M 0% /usr/share/nginx/html
tmpfs 62.8G 12.0K 62.8G 0% /var/run/secrets/kubernetes.io/serviceaccount
tmpfs 62.8G 0 62.8G 0% /proc/kcore
tmpfs 62.8G 0 62.8G 0% /proc/timer_list
tmpfs 62.8G 0 62.8G 0% /proc/timer_stats
tmpfs 62.8G 0 62.8G 0% /proc/sched_debug
tmpfs 62.8G 0 62.8G 0% /sys/firmware
## 写入测试
[root@k8s-node-28 cephrbd]# kubectl exec -it nginx-dm-1697116629-j4m1g -- touch /usr/share/nginx/html/jicki.html
# 删除 pod
[root@k8s-node-28 cephrbd]# kubectl delete pod/nginx-dm-1697116629-j4m1g
pod "nginx-dm-1697116629-j4m1g" deleted
# 新的 pod
[root@k8s-node-28 cephrbd]# kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-dm-1697116629-v2n52 1/1 Running 0 11s
# 查看文件
[root@k8s-node-28 cephrbd]# kubectl exec -it nginx-dm-1697116629-v2n52 -- ls -lt /usr/share/nginx/html
total 16
-rw-r--r-- 1 root root 0 May 9 07:53 jicki.html