apiVersion: v1
kind: Pod
metadata:
  name: pod-volume-demo-hostpath
  labels:
    name: pod-volume-demo-hostpath
spec:
  containers:
  - name: myapp-pod-hostpath
    image: busybox
    command: [ "sh", "-c", "sleep 1h" ]
    volumeMounts:
      - mountPath: /data
        name: host-volume
  volumes:
    - name: host-volume
      hostPath:
        path: /tmp/data     # 在宿主机上，pod删除目录仍在
        
