export EKS_CLUSTER_NAME=coolie-no2 export AWS_REGION=us-east-1 export EKS_VERSION=1.35 export VPC_ID=vpc-006cbaf346bfaf2ea export AZ_1=us-east-1a export AZ_2=us-east-1b export PUBLIC_SUBNET_1=subnet-043a1bb05fe9ca70e export PUBLIC_SUBNET_2=subnet-037d387d6635ce611 export PRIVATE_SUBNET_1=subnet-0077404882dc31899 export PRIVATE_SUBNET_2=subnet-0258de5297d9478cf export NODEGROUP_NAME=$EKS_CLUSTER_NAME-worker-nodes export INSTANCE_TYPE=t3.large export DESIRED_CAPACITY=1 export MIN_SIZE=1 export MAX_SIZE=2 export VOLUME_SIZE=30 export VOLUME_TYPE=gp3 export AMI_FAMILY=AmazonLinux2023 export ENVIRONMENT=production envsubst < scripts/eks-cluster-existing-vpc.yaml > scripts/rendered/eks-cluster-rendered.yaml eksctl create cluster -f scripts/rendered/eks-cluster-rendered.yaml envsubst < scripts/addon-config.yaml > scripts/rendered/addon-config-rendered.yaml eksctl create addon --config-file scripts/rendered/addon-config-rendered.yaml --force echo "Setting up EFS..." source ./scripts/setup-efs.sh if [[ -z "${EFS_ID:-}" ]]; then echo "❌ EFS_ID is empty. EFS setup failed." exit 1 fi ACCESS_POINT=$(aws efs create-access-point \ --file-system-id "$EFS_ID" \ --root-directory "Path=/efs-test,CreationInfo={OwnerUid=1000,OwnerGid=1000,Permissions=750}" \ --query 'AccessPointId' \ --output text) if [[ -z "${ACCESS_POINT}" ]]; then echo "❌ Failed to create access point" exit 1 fi export ACCESS_POINT echo "✅ Created Access Point: $ACCESS_POINT" envsubst < sample-application/test-pv.yaml > sample-application/rendered/test-pv-rendered.yaml kubectl apply -f sample-application/rendered/test-pv-rendered.yaml kubectl apply -f sample-application/test-pvc.yaml kubectl apply -f sample-application/test-pod.yaml kubectl expose pod orders-efs-pod --port=80 --target-port=80 --type=ClusterIP kubectl apply -f sample-application/test-ingress.yaml