Add folder on EC2 as volume on EKS cluster

1/31/2020

I am trying to create a volume in EKS cluster, the background of the volume is basically it is a netapp volume on netapp server and it is also mounted to an EC2 instance which is in same VPC as EKS cluster. This volume is populated with files that are created by a different application.

Flink app that I am deploying to EKS cluster needs read only access to the aforementioned volume. As per kubernetes documentation I can create a PersistentVolume which I can access in the pods of flink cluster.

To create a PV, Using Netapp volume path like {netappaccount}/{instanceid}/{volumeid} or Using the path on EC2 which is already mounted would be better approach ?

If I can use Ec2 how can I create a PV, can I use {Ec2 ipaddress}/{mountpath} ?

Can I use NFS plugin like below ? or could you please suggest best practice ?

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv0001 
spec:     
  accessModes:
  - ReadOnlyOnce 
  nfs: 
    path: /tmp 
    server: EC2Box Ip address 
  persistentVolumeReclaimPolicy: Retain 
-- VSK
amazon-eks
apache-flink
kubernetes
netapp
nfs

1 Answer

3/21/2020

Your best option is Trident. Cloud Manager can automate the deployment around it

Is your NetApp is Cloud Volumes ONTAP? You can reach out via the Cloud Manager chat for further information

-- Aviv Degani
Source: StackOverflow