-
Create an Elastic File System in the VPC created by EKS ensuring a mount target
is created in each subnet. Make a note of the File System ID (circled in the
screenshot below):
To create an Elastic File System, refer to the Creating EFS file system article on the AWS Documentation site: https://docs.aws.amazon.com/.
-
Find the ID of the VPC created when your cluster was built (replace
YOUR-CLUSTER-NAME with the name you gave your
cluster):
aws eks describe-cluster --name YOUR-CLUSTER-NAME --query "cluster.resourcesVpcConfig.vpcId" --output text
-
Find the CIDR range of the VPC (replace VPC-ID with the ID
retrieved in the previous step):
aws ec2 describe-vpcs --vpc-ids VPC-ID --query "Vpcs[].CidrBlock" --output text
-
Go to the Security Groups section of the VPC Console on the AWS Console site
https://console.aws.amazon.com
and search for the VPC using the ID retrieved in step 2, as shown in the
screenshot below:
-
Click on the default security group for the VPC (highlighted in the screenshot
above) and add an inbound rule for NFS traffic from the VPC CIDR range as shown
in the screenshot below:
-
Deploy an NFS Client Provisioner with Helm using the following commands
(replace EFS-DNS-NAME with the string
FILE-SYSTEM-ID.efs.AWS-REGION.amazonaws.com where the
FILE-SYSTEM-ID is the ID retrieved in step 1 and
AWS-REGION is the region you’re using, e.g.
fs-72f5e4f1.efs.us-east-1.amazonaws.com):
helm repo add stable https://kubernetes-charts.storage.googleapis.com helm install alfresco-nfs-provisioner stable/nfs-client-provisioner --set nfs.server="EFS-DNS-NAME" --set nfs.path="/" --set storageClass.name="nfs-client" --set storageClass.archiveOnDelete=false -n kube-system