Junior — Middle
Which specific CSI driver did you use in the YAML configuration file?
sobes.tech AI
Answer from AI
CSI drivers csi-hostpath for testing and local environments, or csi-driver-nfs for connecting NFS volumes, are often used in YAML configuration files for Kubernetes. For example, to connect an NFS volume in a PersistentVolume, you can specify:
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-nfs
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
csi:
driver: nfs.csi.k8s.io
volumeHandle: unique-volumeid
volumeAttributes:
server: nfs-server.example.com
share: "/exported/path"
The choice of a specific CSI driver depends on the storage and infrastructure used.