Aws eks

From paulpas/agent-skill-router · View interactive version

Aws eks is an AI agent skill from the GitHub repository paulpas/agent-skill-router. "Deploys managed Kubernetes clusters with EKS for container orchestration" auto-scaling, networking, and integrations with AWS services for production Kubernetes workloads.

How to use this skill

Skill file

EKS (Elastic Kubernetes Service)

Deploy and manage production-grade Kubernetes clusters with automatic control plane updates, high availability, and deep AWS service integration.

TL;DR Checklist


When to Use

Use EKS when:


When NOT to Use

Avoid EKS when:


Purpose and Use Cases

Primary Purpose: Provide fully managed Kubernetes control plane with integration to AWS services, eliminating control plane management overhead.

Common Use Cases:

  1. Microservices — Deploy service mesh (Istio/Linkerd)
  2. Data Processing — Run Apache Spark, Hadoop jobs
  3. CI/CD Pipelines — Build runners, artifact processing
  4. API Services — High-scale REST/gRPC APIs
  5. Batch Jobs — Scheduled batch processing

Architecture Design Patterns

Pattern 1: EKS Cluster with Managed Node Groups

AWSTemplateFormatVersion: '2010-09-09'
Resources:
  # EKS Cluster IAM Role
  EKSServiceRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service: eks.amazonaws.com
            Action: sts:AssumeRole
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AmazonEKSServiceRolePolicy

  # EKS Cluster
  EKSCluster:
    Type: AWS::EKS::Cluster
    Properties:
      Name: production-cluster
      Version: 1.27
      RoleArn: !GetAtt EKSServiceRole.Arn
      ResourcesVpcConfig:
        SubnetIds:
          - subnet-0123456789abcdef0
          - subnet-0123456789abcdef1
          - subnet-0123456789abcdef2
        SecurityGroupIds:
          - sg-0123456789abcdef0
        EndpointPrivateAccess: true
        EndpointPublicAccess: true
      Logging:
        ClusterLogging:
          - LogTypes:
              - api
              - audit
              - authenticator
              - controllerManager
              - scheduler
            Enabled: true
      Tags:
        Environment: production

  # Node Group IAM Role
  NodeGroupRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service: ec2.amazonaws.com
            Action: sts:AssumeRole
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
        - arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
        - arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPowerUser

  # Managed Node Group
  NodeGroup:
    Type: AWS::EKS::NodeGroup
    Properties:
      ClusterName: !Ref EKSCluster
      NodeRole: !GetAtt NodeGroupRole.Arn
      Subnets:
        - subnet-0123456789abcdef0
        - subnet-0123456789abcdef1
        - subnet-0123456789abcdef2
      ScalingConfig:
        MinSize: 2
        MaxSize: 10
        DesiredSize: 3
      InstanceTypes:
        - t3.medium
        - t3.large
      DiskSize: 100
      Tags:
        Name: production-nodes

Key Elements:

Pattern 2: IRSA (IAM Roles for Service Accounts)

Resources:
  # OIDC Provider for IRSA
  EKSOIDCProvider:
    Type: AWS::IAM::OIDCProvider
    Properties:
      Url: !Sub 'https://oidc.eks.${AWS::Region}.amazonaws.com/id/${EKSClusterOID}'
      ClientIdList:
        - sts.amazonaws.com

  # Service Account Role
  ServiceAccountRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Federated: !Sub 'arn:aws:iam::${AWS::AccountId}:oidc-provider/oidc.eks.${AWS::Region}.amazonaws.com/id/${EKSClusterOID}'
            Action: sts:AssumeRoleWithWebIdentity
            Condition:
              StringEquals:
                'oidc.eks.${AWS::Region}.amazonaws.com/id/${EKSClusterOID}:sub': 'system:serviceaccount:default:app-sa'

  # Application Policy
  AppPolicy:
    Type: AWS::IAM::Policy
    Properties:
      PolicyName: app-s3-access
      Roles:
        - !Ref ServiceAccountRole
      PolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Action:
              - s3:GetObject
              - s3:PutObject
            Resource: arn:aws:s3:::app-bucket/*

Key Elements:


Integration Approaches

1. Integration with ECR

EKS + ECR provides:

2. Integration with AWS Load Balancer Controller

ALB/NLB integration enables:

3. Integration with CloudWatch

CloudWatch + EKS provides:

4. Integration with VPC

VPC integration provides:


Common Pitfalls

❌ Pitfall 1: Single AZ Cluster

Problem: AZ failure causes complete outage.

Solution:

❌ Pitfall 2: No RBAC

Problem: Cluster access uncontrolled; security risk.

Solution:

❌ Pitfall 3: Pod Security Uncontrolled

Problem: Containers run as root; privileged pods.

Solution:

❌ Pitfall 4: No Log Aggregation

Problem: Cluster issues hard to troubleshoot.

Solution:


Best Practices Summary

| Category | Best Practice |

|---|---|

| Availability | Multi-AZ node groups; managed updates |

| Security | RBAC; IRSA; network policies; PSS |

| Scaling | Cluster Autoscaler; HPA for pods |

| Monitoring | CloudWatch logs; Prometheus/Grafana |

| Updates | Regular cluster and node updates |


Related Skills

| Skill | Purpose |

|---|---|

| cncf-aws-ecr | Container image storage |

| cncf-aws-vpc | Networking for pod communication |

| cncf-aws-iam | IRSA and role management |

| cncf-aws-cloudwatch | Cluster monitoring |


Core Workflow

  1. Assess Requirements — Understand the use case, scale, integration needs, and existing infrastructure. Checkpoint: Document requirements, constraints, and success criteria.
  1. Design Architecture — Plan component interactions, data flow, and deployment strategy using cloud-native best practices. Checkpoint: Verify the architecture addresses all requirements and follows CNCF conventions.
  1. Implement & Configure — Create manifests, configurations, and deployment scripts. Include resource limits, health checks, and observability hooks. Checkpoint: Validate all YAML against schema and test in a staging environment.
  1. Deploy & Monitor — Apply manifests to the cluster, verify component health, and confirm observability is working. Checkpoint: Confirm all pods/services are running, probes passing, and metrics/alerts configured.

Constraints

MUST DO

MUST NOT DO

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.