Will this strategy successfully accomplish this?
During development of an application meant to be orchestrated by Kubernetes, you want to mount the /data directory on your laptop into a container.
Will this strategy successfully accomplish this?
Solution: Create a PersistentVolume with storageciass: "" and hostPath: /data, and a persistentVolumeClaim requesting this PV. Then use that PVC to populate a volume in a pod
A . Yes
B . No
Answer: B
Explanation:
= The strategy of creating a PersistentVolume with hostPath and a PersistentVolumeClaim to mount the /data directory on your laptop into a container will not work, because hostPath volumes are only suitable for single node testing or development. They are not portable across nodes and do not support dynamic provisioning. If you want to mount a local directory from your laptop into a Kubernetes pod, you need to use a different type of volume, such as NFS, hostPath CSI, or minikube. Alternatively, you can copy the files from your laptop to the container using kubectl cp command.
Reference: Volumes | Kubernetes
Configure a Pod to Use a PersistentVolume for Storage | Kubernetes
Mount a local directory to kubernetes pod – Stack Overflow
Kubernetes share a directory from your local system to kubernetes container – Stack Overflow
How to Mount a Host Directory Into a Docker Container
Latest DCA Dumps Valid Version with 55 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund