This will help to creat
- eks cluster using eksctl
- deploy aws-efs provisioner using kustomize
- create a storage class name aws-efs into the cluster
install following components before you start
The following will create eks cluster named mycluster
in the aws region us-east-1
. allso deploy efs provisioner and create a storage class named aws-efs
./setup-eks-with-sc.sh mycluster us-east-1
The following command will delte the eks cluster
./delete-cluster mycluster us-east-1
if you have already a cluster in eks, you should be able to create efs provisioner and storage class using kustomize
by referencing to the resources directory
follow this link to setup EFS file system first using EFS Creation
Make a place to work
DEMO_HOME=$(mktemp -d)
create a patch file
cat <<EOF >$DEMO_HOME/patch.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: not-important
data:
fileSystemId: EFS_FILE_SYSTEM_ID_BEEN_CREATED_ABOVE
efsRegion: AWS_REGION
EOF
define a kustomization file that specifies your patch.
cat <<EOF >$DEMO_HOME/kustomization.yaml
resources:
- github.com/ffoysal/efs-provisioner//resources
patches:
- path: patch.yaml
target:
kind: ConfigMap
name: efs-provisioner-configs
EOF
then run kustomize
kustomize build $DEMO_HOME | kubectl apply -f -