FSx ONTAP static provisioning

0

I'd want to create a persistent volume to an existing FSx volume and access it via the ONTAP CSI driver (Trident). We have successfully defined a dynamically provisioned volume using a PVC but all these claims have persistentVolumeReclaimPolicy: Delete set on them so when the PVC is deleted the file system is also deleted. We need an FSx volume that will not be deleted when the PV and PVC go away for any unspecified reason.

I have had no luck writing a PV yaml file that supplies a persistent volume to a PVC that can be mounted into a pod. The pods can never find the persistent volume. This is an example of what my PV yaml files look like:

apiVersion: v1 kind: PersistentVolume metadata: name: pvc-share namespace: prod spec: accessModes:

  • ReadWriteMany capacity: storage: 100Gi csi: driver: csi.trident.netapp.io fsType: FILESYSTEM_TYPE volumeAttributes: internalName: Share name: Share protocol: file storage.kubernetes.io/csiProvisionerIdentity: csi.trident.netapp.io volumeHandle: Share persistentVolumeReclaimPolicy: Retain storageClassName: fsx-csi volumeMode: Filesystem

Share is the name of my are ready defined FSx volume.

질문됨 일 년 전863회 조회
3개 답변
0

I do see that you are using NetApp ONTAP CSI driver (Trident) and you are looking for help in writing a PV yaml file. You might already be aware that, NetApp's Astra Trident provides dynamic storage orchestration using a Container Storage Interface (CSI) compliant driver. This allows Amazon EKS clusters to manage the lifecycle of persistent volumes (PVs) backed by Amazon FSx for NetApp ONTAP file systems.

You can consider checking below NetApp documentation for Use Astra Trident with Amazon FSx for NetApp ONTAP

AWS
지원 엔지니어
답변함 일 년 전
  • What about defining a statically provisioned PV using NetApp ONTAP CSI driver? My FSx volume is already there I just want to be able to mount it via a PVC in my pod. Is this possible?

0

We have successfully used dynamic provisioning with Trident and FSx volumes. The only issue we have is they all have persistentVolumeReclaimPolicy set to delete on the PVC's which means if the PVC is deleted the volume is deleted too. So this is not good for us. Is there a way to change this so the dynamic volume has persistentVolumeReclaimPolicy set to retain? and how to you reconnect to an existing volume when the dynamic provisioned PVC gets created again?

TIA, Bob

답변함 일 년 전
0

This is my solution:

  1. create the original PV using dynamic provisioning supplied by the Trident ONTAP CSI driver.
  2. Immediately edit the PV that was created and change the persistentVolumeReclaimPolicy from Delete to Retain
  3. If the PVC is ever deleted the PV will remain. Edit it again and remove the claim from the PV. It should then say Available as its Status.
  4. Recreated the PVC, referencing the old PV volumeName.
  5. Any new pods should now be able to mount the PVC and allow access to the FSx volume in the pod's file system.

Good luck.

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠