Prerequisites
- AWS CLI configured
eksctlandkubectlinstalled
Quick Deployment (10 min)
Step 1: Create Cluster Configuration
Create eks-prod.yaml:
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: kafka-prod-cluster
region: ap-south-1
version: "1.33"
iam:
withOIDC: true
availabilityZones:
- ap-south-1a
- ap-south-1b
- ap-south-1c
managedNodeGroups:
- name: standard-workers
instanceType: c7i-flex.large
# Note: change the instance type to one supported by AWS EKS, else nodes will not be provisioned
availabilityZones:
- ap-south-1a
- ap-south-1b
- ap-south-1c
desiredCapacity: 3
minSize: 3
maxSize: 6
volumeSize: 100
volumeType: gp3
privateNetworking: true
ssh:
allow: false # Disable SSH for production
iam:
withAddonPolicies:
autoScaler: true
albIngress: true
cloudWatch: true
ebs: true
addons:
- name: aws-ebs-csi-driver
version: latest
attachPolicyARNs:
- arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy
cloudWatch:
clusterLogging:
enableTypes:
- api
- audit
- authenticatorStep 2: Deploy Cluster
# Single command creates everything
eksctl create cluster -f eks-prod.yaml
# Configure kubectl
aws eks update-kubeconfig --region ap-south-1 --name prod-clusterStep 3: Verify
# Check cluster status
kubectl get nodes
kubectl get pods -A
eksctl get nodegroup --cluster prod-clusterProduction Features
- Private workers - Enhanced security
- Multi-AZ - High availability
- Auto-scaling - 3-6 nodes
- OIDC - IAM roles for pods
- Audit logging - CloudWatch enabled
- gp3 volumes - Better performance
Cleanup
eksctl delete cluster --name prod-cluster --region ap-south-1