mk:
hello, everyone.
i hope everything is fine.
i have a question about HostPath type of volumes.
so in the doc it says A hostPath volume mounts a file or directory from the host node's filesystem into your Pod
here is the link: <https://kubernetes.io/docs/concepts/storage/volumes/#hostpath>
so, when i was creating this pv:
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-httpd-webroot
spec:
capacity:
storage: 64Mi
volumeMode: Filesystem
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: manual
hostPath:
path: "/mnt/data"
i was expecting the pod that will claim this, would save everything under the node host “/mnt/data”
but once i’ve deployed and create a file, i’ve checked under that path and ther was nothing:
# tree mnt/
mnt/
0 directories, 0 files
so i was woundering that which path actually is being used by this statement?:
hostPath:
path: "/mnt/data"
thanks a lot for your help!