- 08 Jul 2024
- 1 Minute to read
- Print
- DarkLight
Create PVC on AWS EKS
- Updated on 08 Jul 2024
- 1 Minute to read
- Print
- DarkLight
As prerequisites for PVC creation, be sure to have the Amazon Elastic Kubernetes Service (Amazon EKS) ready. Then follow these links:
Use the CSI Driver Token (Refresh Token). This can be taken from Volumez.com. Go to Sign in > Developer Info.
Region - Set the target AWS region (for example: us-east-1).
EKS cluster creation:
If needed, you can use Volumez Terraform to create an EKS cluster. the source code can be cloned from https://github.com/VolumezTech/volumez.git
see more details in https://github.com/VolumezTech/volumez?tab=readme-ov-file#eks.
an example with default values, as follows:
terraform init
terraform apply -var-file=”easy_starter.tfvars”
Use these custom variables:
terraform init
terraform apply -var=”media_node_count=4” -var=”media_node_type=i3en.3xlarge”
Usage (helm): Deploy Volumez-CSI configuration
Configure kubectl so that you can connect to an EKS cluster, as follows:
aws eks --region <region> update-kubeconfig --name <cluster_name>
If not known, The region and cluster_name parameters can be found in Terraform's output.
Deploy CSI driver deployment with helm:
helm repo add volumez-csi https://volumeztech.github.io/helm-csi
helm install volumez-csi volumez-csi/volumez-csi --set vlzAuthToken=eyJjdHkiOiJKV1QiLC -n vlz-csi-driver --create-namespace
Install Only on Specific Node/Node-Group
To install the volumez-csi on a specific node or nodegroup, label the node/nodegroup and add the following to the end of the install command (fill in the correct values instead of "label-key" and "label-values"):
--set-json 'csiNodeVlzplugin.affinity={"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"<label-key>","operator":"In","values":["<label-values>"]}]}]}}}'
Such as:
--set-json 'csiNodeVlzplugin.affinity={"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"nodepool-type","operator":"In","values":["app", "media"]}]}]}}}'
After completing the prerequisites, select the Volumez settings for your mode of operation:
Auto-Provisioned Volume
Shared Media Volume
For further explanation on Auto-Provisioning and Shared Media refer to: https://docs.volumez.com/v1/docs/create-volumes