Introduction to EKS & Key AWS EKS Components

Amazon Elastic Kubernetes Service (EKS) is a managed service that simplifies Kubernetes deployments. Below, we will explore the key components of EKS and how to manage access securely.

What is AWS EKS?

  • Amazon Elastic Kubernetes Service (EKS) is a fully managed service that simplifies Kubernetes deployment, management, and scaling on AWS. It enables developers to run Kubernetes clusters without worrying about the complexity of managing the underlying infrastructure.

  • EKS automates much of the administrative tasks, such as monitoring, scaling, and patching the control plane, so you can focus on deploying and scaling your applications.

  • Key Benefits of EKS:

    • Fully Managed: AWS handles all the heavy lifting of managing the Kubernetes control plane.
    • High Availability: EKS is designed to be highly available, running across multiple Availability Zones (AZs).
    • Scalability: EKS can scale up and down based on the needs of your application.

Now, let’s dive into the core components that make EKS work.

Components of AWS EKS?

  • EKS Control Plane

    • The Control Plane is the heart of the EKS service and is fully managed by AWS. It consists of multiple services distributed across three AWS Availability Zones, which ensures redundancy and high availability.

    • Responsibilities of the Control Plane:

    • Kubernetes API Server: This is the entry point for interacting with your cluster. All commands and communications from your applications go through the API server.

    • ETCD: A key-value store where Kubernetes stores all cluster data. This is critical for keeping the cluster in sync across nodes.

    • Controller Manager: Ensures that the state of your application matches the desired state. For example, if a pod goes down, the controller ensures it’s restarted.

    • Scheduler: Decides which node will run a specific pod, optimizing resource usage.

The control plane also manages the networking between your pods and handles load balancing between nodes​(Amazon Web Services, Inc.

  • EKS Data Plane

    • The Data Plane is where your workloads (applications and services) run. This consists of Amazon EC2 instances that serve as worker nodes. You can choose the instance type that fits your workload, and EKS manages communication between the control plane and these worker nodes.
    • Flexible Scaling: The data plane scales with demand, allowing you to increase or decrease the number of EC2 instances based on the current workload.
    • Integration with AWS Services: EKS integrates with AWS services like Elastic Load Balancer (ELB) and Auto Scaling Groups, which automatically manage traffic and adjust node size.
    • Worker Nodes (The data plane in EKS is essentially made up of the worker nodes):
      • Each worker node is an EC2 instance that runs the Kubernetes components needed to manage your workloads, such as the kubelet, which communicates with the API server.
      • These nodes are responsible for running your application pods.
  • Fargate for EKS (Serverless Option)

    • Fargate is AWS’s serverless compute option for EKS, which eliminates the need to manage EC2 instances for running Kubernetes pods. With Fargate, you specify the resources your pods need (CPU, memory), and AWS automatically provisions and manages the infrastructure.

    • Advantages of Fargate:

    • No Node Management: You don't need to worry about managing or scaling EC2 instances.

    • Cost-Efficient: You only pay for the resources your application uses.

    • Serverless Architecture: Fargate automatically scales based on your application’s requirements.

  • EKS Networking and Load Balancing

    • Networking is crucial in EKS, as it controls how pods communicate with each other and external services.

    • Key Components:

      • Kubernetes Networking: Each pod in EKS gets its own IP address, which allows for direct communication between pods without network address translation (NAT).
      • Elastic Load Balancer (ELB): EKS integrates with AWS’s Elastic Load Balancer to distribute incoming traffic across your worker nodes. This ensures high availability and smooth user experience even during traffic spikes.
  • Load Balancer Example:

    • You can set up an ALB (Application Load Balancer) to route traffic between your pods based on a specific rule, such as URL path.
  • EKS Security and IAM

    • Security in EKS is achieved through a combination of AWS Identity and Access Management (IAM) and Kubernetes Role-Based Access Control (RBAC). This ensures fine-grained control over who can access your Kubernetes resources.

    • Key Security Features:

      • IAM for Pods (IRSA): IAM Roles for Service Accounts (IRSA) enable you to assign IAM roles to Kubernetes pods, allowing them to securely access AWS services.

      • RBAC: Kubernetes RBAC restricts which users and pods can perform certain actions on resources within the cluster.

      • Example: IAM Role for Pods (IRSA)

        • Create an IAM role with the required permissions (e.g., access to an S3 bucket).
        • Associate the IAM role with a Kubernetes service account.
        • The pod will automatically assume this role and gain access to the required AWS service.
  • EKS Storage Options

    • EKS offers multiple storage options, depending on the type of data you need to store:

      • Ephemeral Storage: Temporary data tied to the pod’s lifecycle.
      • Amazon EBS (Elastic Block Store): Persistent storage volumes for stateful applications, such as databases.
      • Amazon EFS (Elastic File System): Scalable file storage for applications needing shared access to files.

These storage solutions integrate seamlessly with EKS and provide flexibility based on your needs.

  • Monitoring and Observability

    • EKS integrates with AWS services like CloudWatch and GuardDuty to provide monitoring, logging, and security threat detection for your cluster.

    • Monitoring Tools:

      • Amazon CloudWatch: Monitor metrics such as CPU usage, memory, and network traffic.
      • Amazon GuardDuty: Detect suspicious activity, like unauthorized access to your cluster or node misconfigurations​Amazon AWS Docs.