AWS EKS
πΉ AWS EKS Cluster Architecture (AWS Infrastructure Side)
This guide covers: β EKS Cluster Architecture from AWS perspective β How AWS components interact with EKS β Real-world enterprise deployment example β Networking, Load Balancing, and Compute considerations
Karpenter, aws alb, ebs driver ALL THIS CONTROLLER EXPOSE DEFAULT METRICS AT /METRICS PATH by default
πΉ AWS Components Used in EKS Cluster
Before setting up EKS, letβs understand how AWS services work together to provide a fully managed Kubernetes cluster.
Component
Description
EKS Control Plane
AWS-managed Kubernetes control plane that schedules workloads and manages the cluster.
VPC (Virtual Private Cloud)
Provides networking for the cluster, including subnets, NAT Gateway, and internet access.
Subnets (Public & Private)
Nodes are deployed in private subnets; public subnets are used for Load Balancers.
Elastic Load Balancer (ELB)
Used for Ingress; Application Load Balancer (ALB) or Network Load Balancer (NLB) routes traffic.
EKS Node Groups
EC2 instances that run worker nodes to host pods.
Fargate
Serverless compute for running pods without managing EC2 instances.
IAM (Identity and Access Management)
Provides access control to AWS resources for EKS components.
Security Groups & NACLs
Controls network traffic to and from nodes and workloads.
Route Table
Defines network communication rules within the VPC.
ECR (Elastic Container Registry)
Stores container images used by EKS workloads.
CloudWatch & Prometheus
Monitors logs and metrics for EKS.
Auto Scaling
Automatically scales worker nodes based on demand.
πΉ EKS Deployment - AWS Infrastructure
Scenario: A company wants to deploy a highly available, production-ready EKS cluster. β The application should be accessible via an ALB. β Workloads must be securely deployed in private subnets. β The cluster should auto-scale based on demand. β Fargate should be used for some serverless workloads.
EKS Infrastructure Diagram
πΉ Step-by-Step AWS Console Setup for EKS
1οΈβ£ Create a VPC for EKS
Go to AWS Console β VPC Dashboard β Create VPC
VPC Name:
EKS-VPCCIDR Block:
10.0.0.0/16Click Create VPC
β Common Issue: "EKS requires private subnets." πΉ Fix: Ensure subnets are correctly labeled as private in AWS tags.
2οΈβ£ Create Public and Private Subnets
Go to VPC Dashboard β Subnets β Create Subnet
Subnets:
Public Subnet 1 (for Load Balancer):
10.0.1.0/24Public Subnet 2 (for Load Balancer):
10.0.2.0/24Private Subnet 1 (for Worker Nodes):
10.0.3.0/24Private Subnet 2 (for Worker Nodes):
10.0.4.0/24
Click Create Subnets
β Common Issue: "EKS workloads cannot access the internet." πΉ Fix: Ensure NAT Gateway is configured for private subnets.
3οΈβ£ Set Up an Internet Gateway (IGW) & NAT Gateway
Go to VPC Dashboard β Internet Gateways β Create Internet Gateway
Attach it to
EKS-VPCFor Private Subnets:
Go to NAT Gateway β Create NAT Gateway
Attach it to a public subnet
Associate with private subnet route table
β Common Issue: "Pods in private subnet can't access the internet." πΉ Fix: Ensure NAT Gateway is properly routing outbound traffic.
4οΈβ£ Create an EKS Cluster
Go to EKS Console β Create Cluster
Cluster Name:
Production-EKSSelect VPC:
EKS-VPCChoose Subnets: (Private Subnets)
Click Create Cluster
β Common Issue: "Cluster creation fails." πΉ Fix: Ensure IAM roles and networking configurations are correct.
5οΈβ£ Set Up EKS Node Groups (Worker Nodes)
Go to EKS Console β Node Groups β Create Node Group
Node Group Name:
Worker-GroupAMI Type:
Amazon Linux 2Select Private Subnets
Instance Type:
m5.largeAuto Scaling: Enable
Click Create
β Common Issue: "Nodes not joining the cluster." πΉ Fix: Ensure correct IAM roles and security groups are attached.
6οΈβ£ Configure Ingress Using AWS ALB
Install ALB Ingress Controller
Deploy an Ingress Rule
β Common Issue: "Ingress controller not creating ALB." πΉ Fix: Ensure IAM roles for ALB Controller have correct permissions.
7οΈβ£ Monitoring & Scaling with CloudWatch & Prometheus
Go to AWS Console β CloudWatch β Create Log Group
Install Prometheus for EKS monitoring
Enable Horizontal Pod Autoscaler (HPA)
β Common Issue: "HPA not scaling workloads." πΉ Fix: Ensure metrics server is installed.
πΉ Summary of AWS EKS Infrastructure
β VPC with Public & Private Subnets β EKS Cluster with Node Groups in Private Subnets β NAT Gateway for Private Subnet Internet Access β ALB for Ingress Traffic Handling β Auto Scaling & Monitoring for High Availability
π₯ Next Steps
Do you want to configure EKS networking policies or RBAC for security? Let me know! π
Last updated