Lesson 3 of 4 Amazon ECS, Amazon EKS and Amazon ECR

Operating and Scaling Amazon EKS Clusters

This lesson explains how operators manage EKS worker nodes, add-ons, upgrades, scaling and access around the managed Kubernetes control plane.

Learning outcomes

After completing this lesson, you will be able to:

  • Manage node groups, add-ons and upgrades.
  • Scale pods with HPA and nodes with Karpenter or Cluster Autoscaler.
  • Grant access with access entries and Pod Identity.

Nodes, add-ons and upgrades

Pods run on managed node groups (EKS manages the Auto Scaling group and rolling node updates), self-managed nodes, Fargate profiles or EKS Auto Mode, where AWS manages compute, networking and storage components. EKS add-ons install and update operational software such as the VPC CNI, CoreDNS, kube-proxy, the EBS CSI driver and the CloudWatch Observability agent. Kubernetes versions have standard and extended support periods; upgrading means updating the control plane one minor version at a time, then add-ons and node groups.

Scaling pods and nodes

Kubernetes scales at two levels. The Horizontal Pod Autoscaler (HPA) changes the number of pod replicas based on CPU, memory or custom metrics (it needs the Kubernetes Metrics Server). When pods cannot be scheduled for lack of capacity, a node autoscaler adds nodes: Karpenter provisions right-sized instances directly from pending pod requirements and consolidates under-used nodes, while the Cluster Autoscaler adjusts the desired size of node group Auto Scaling groups. EKS Auto Mode includes Karpenter-based scaling. Pods waiting with Pending status and Insufficient cpu events indicate that node scaling is missing or limited by maximum sizes.

The following diagram shows the two scaling layers working in sequence.

Scaling on Amazon EKS. The Horizontal Pod Autoscaler adds replicas when metrics from the Metrics Server rise. Pods that cannot be scheduled stay Pending with Insufficient cpu events, and a node autoscaler such as Karpenter provisions right-sized nodes for them and later consolidates under-used nodes.
Without a node autoscaler, the HPA's new pods stay Pending.
Sort into groups

Pods or nodes?

Exam skills 2.1.1

Decide whether each component scales pods or nodes.

Log in to try this activity Interactive activities are free with an account.

Access and networking

EKS access entries grant IAM principals access to the cluster's Kubernetes API with access policies, replacing the older aws-auth ConfigMap. Pods obtain AWS permissions through EKS Pod Identity or IAM roles for service accounts (IRSA), not node roles. The VPC CNI gives each pod a VPC IP address, so small subnets run out of IPs as pods scale; prefix delegation, larger subnets or secondary CIDRs fix this. The following table summarises common EKS problems.

SymptomLikely causeFix
Pods Pending, Insufficient cpu/memoryNo node autoscaling or node group at maximumKarpenter or Cluster Autoscaler; raise maximum
Pods Pending, failed to assign an IPSubnet IP exhaustionPrefix delegation, larger subnets, secondary CIDR
kubectl: UnauthorizedIAM principal has no access entryCreate an access entry and policy
Pod AccessDenied to S3No Pod Identity association or IRSA roleAssociate a role with the service account
Nodes NotReadyNode role, CNI add-on or networking issueCheck node role policies and add-on status
Worked example

Scaling a batch workload on EKS

A team runs bursty batch jobs on an EKS cluster with a fixed managed node group of six nodes. Jobs sit in Pending for hours during peaks, and nodes are idle at night. The operator installs Karpenter with a NodePool that allows several Graviton instance families with Spot and On-Demand capacity, sets CPU limits, and enables consolidation. Pending pods now trigger new nodes within a minute, and idle nodes are removed at night, reducing cost by half.

Check yourself

Which components scale pods and which scale nodes?

Show answer

The Horizontal Pod Autoscaler scales pods; Karpenter or Cluster Autoscaler scales nodes.

Exam Tips

Remember for the exam

  • HPA scales pods; Karpenter or Cluster Autoscaler scales nodes.
  • Pending pods with insufficient resources mean node scaling is missing or capped.
  • Use access entries for cluster access and Pod Identity or IRSA for pod AWS permissions.
  • VPC CNI uses a VPC IP per pod; watch subnet IP exhaustion.
  • Upgrade the control plane one minor version at a time, then add-ons and nodes.