AWS DevOps Series - Day 22: Elastic Kubernetes Service (EKS)
Introduction to EKS
- Speaker: Abhishek
- Topic: Deep dive into Elastic Kubernetes Service (EKS)
- Importance: Kubernetes is a critical skill for DevOps engineers today.
- Goal: Learn about EKS and deploy a practical real-time application using EKS.
Key Concepts of EKS
What is EKS?
- Managed Kubernetes: EKS is a managed service that simplifies the setup and management of Kubernetes clusters on AWS.
- Components:
- Control Plane: Managed by AWS, includes API server, etcd, scheduler, etc.
- Data Plane: User-managed, includes worker nodes (EC2 instances or Fargate).
- Benefits of EKS:
- Reduces operational overhead
- AWS handles the control plane components
Comparison with Other Solutions
- Manual Setup: Using tools like kubeadm or kops requires complex configurations and management of issues like API server downtime, etcd crashes, and certificate renewals.
- EKS Advantages:
- AWS handles control plane concerns.
- Users can focus on application deployment rather than managing infrastructure.
EKS Architecture
- High Availability: Recommended to have multiple master nodes for high availability.
- Deployment Options:
- EC2 Instances: Manage your own worker nodes.
- Fargate: Serverless compute option for running containers without managing instances.
EKS Workflow
- Create EKS Cluster: Using the
eksctl
command-line utility.
- Example command:
eksctl create cluster --name demo-cluster
.
- Creates a VPC with public/private subnets automatically.
- Deploying Applications:
- Applications run in pods, which are managed by Deployments.
- Services expose applications to external traffic.
- Ingress Controllers:
- Used to manage external access to services in a Kubernetes cluster.
- Different types: Nginx, AWS ALB Ingress controllers.
Ingress Resource
- Purpose of Ingress: Routes external traffic to services within the cluster.
- Configuration: Developers specify how URLs should map to services.
- ALB Ingress Controller: Automatically provisions an Application Load Balancer when Ingress resources are created.
Practical Demonstration
Setting Up a Sample Application
- Create a Fargate Profile for namespace
game2048
to allow deployments in that namespace.
- Deploy Application: Use a deployment YAML to create a pod for the 2048 game application and expose it via a service.
- Ingress Resource Setup: Define how to route traffic to the service.
- Install Ingress Controller: Use Helm charts to install an ALB controller, which will manage the ALB for the application.
- Testing: Once the ALB is ready, access the application through the public IP provided by the ALB.
Troubleshooting Common Issues
- Service Account Creation: Ensure service accounts are correctly created and associated with the necessary IAM roles for the ALB controller.
- Monitoring Deployment Status: Use
kubectl get pods
and kubectl describe
commands to monitor the status of your deployments and troubleshoot errors.
Conclusion
- EKS Importance: Provides a robust, managed environment for Kubernetes, allowing DevOps engineers to focus on applications rather than infrastructure management.
- Next Steps: Encourage viewers to try deploying applications on EKS and explore further configurations.
Note: Links to related resources and GitHub repository for commands will be available in the video description.