Install Amazon EBS CSI Driver
Install Amazon EBS CSI Driver
The Amazon EBS CSI Driver enables Kubernetes workloads running on Amazon EKS to provision and manage persistent volumes backed by Amazon EBS.
This driver is required for stateful Zilla Platform components such as PostgreSQL and Kafka.
Create IAM Service Account for EBS CSI Driver
Create an IAM service account for the EBS CSI controller using IAM Roles for Service Accounts (IRSA):
eksctl create iamserviceaccount \
--cluster=${CLUSTER_NAME} \
--namespace=kube-system \
--name=ebs-csi-controller-sa \
--attach-policy-arn=arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \
--override-existing-serviceaccounts \
--region=${AWS_REGION} \
--approveRetrieve the IAM Role ARN
Fetch the IAM role ARN created for the EBS CSI controller:
ROLE_ARN=$(aws cloudformation describe-stacks \
--stack-name eksctl-${CLUSTER_NAME}-addon-iamserviceaccount-kube-system-ebs-csi-controller-sa \
--query 'Stacks[0].Outputs[?OutputKey==`Role1`].OutputValue' \
--output text --region ${AWS_REGION})
echo "Role ARN: $ROLE_ARN"Install the EBS CSI Driver Add-on
Install the AWS-managed EBS CSI Driver add-on and associate it with the IAM role:
eksctl create addon \
--cluster ${CLUSTER_NAME} \
--name aws-ebs-csi-driver \
--region ${AWS_REGION} \
--service-account-role-arn ${ROLE_ARN}Verify Driver Status
Confirm that the EBS CSI Driver pods are running:
kubectl get pods -n kube-system -l app.kubernetes.io/name=aws-ebs-csi-driverVerify the driver is working (all pods should be Running with 6/6 containers).
Create GP3 Storage Class
Create a Kubernetes StorageClass backed by Amazon EBS gp3 volumes and mark it as the default:
cat <<EOF | kubectl apply -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: gp3
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
parameters:
type: gp3
EOFThis storage class will be used automatically by Zilla Platform components that request persistent volumes.