设置 type 为:DirectoryOrCreate

如下:


volumes:
- name: shared-dir
  hostPath:
    path: /home/ubuntu/data
    type: DirectoryOrCreate