AWS Builder Center

Pod implementation → EKS — lifecycle, init, the sandbox, and probes

Pod implementation → EKS — lifecycle, init, the sandbox, and probes

A services-only reading-review of the Kubernetes Pod sources: the pod lifecycle, init containers, the pause (sandbox) container, and liveness/readiness/startup probes. The question this page answers is the one the reading leaves open — when a pod actually runs on EKS, what AWS surface sits under each phase, and who owns the node, the network identity, and the health decision.
Sources reviewed (titles/paths, grouped — see "Verified, and not" at the end for what that means):
  • jimmysong .../pod-pod-lifecycle — phases, conditions, termination
  • jimmysong .../pod-init-containers — ordered setup before the app container
  • jimmysong .../pod-pause-container — the sandbox that holds the pod's namespaces
  • jimmysong .../pod-liveness-readiness-probes — health and traffic-readiness checks

1. Where a pod runs → node model and the sandbox

The lifecycle reading starts with scheduling a pod onto a node and standing up its containers. On EKS "the node" is one of three things, and the pause container's job — holding the pod's network namespace — is where AWS networking attaches.
What the reading showsEKS realityWho owns it
Pod lands on a nodeEC2 managed node group, self-managed node, or AWS Fargate (one pod per microVM)You pick; AWS runs node software
Container runtime starts containerscontainerd on the EKS-optimized AMI or BottlerocketAWS ships the runtime
Pause container holds the network namespacePod gets an ENI-backed VPC IP from the Amazon VPC CNIShared — real VPC address per pod
Image pull before startAmazon ECR (node role or IRSA for auth; pull-through cache)Shared
Pod resource requests/limitsNode instance size, or Fargate pod size tiersYou size it
The portable part: the pod object, its phases, and the sandbox model are upstream Kubernetes and run unchanged. The part that changes: on Fargate there is no shared node you manage — the pod is the isolation boundary — and the VPC CNI gives each pod a routable VPC IP through the namespace the pause container holds.

2. Init containers → pulling AWS state before the app

The init-container reading teaches ordered, run-to-completion setup before the app container. On EKS this is the natural place to fetch AWS-held configuration and credentials.
Init-container use from the readingEKS patternOwner
Wait for a dependencyUnchanged; ordered, blockingYou
Fetch config/secrets before startPull from AWS Secrets Manager / SSM Parameter Store (or let the Secrets Store CSI driver mount them)Shared
Set up a shared volumeEBS/EFS volume attached, then populatedShared
Get an AWS identityPod uses IRSA / EKS Pod Identity — no init step needed to fetch keysYou wire it
The through-line: init containers stay a clean place for ordered setup, but the credential problem they often solved (go get a secret first) is better handled by the pod's IAM identity through IRSA or Pod Identity, so the app gets short-lived credentials without an init step copying long-lived keys.

3. Probes → health, traffic readiness, and the load balancer

The probe reading separates liveness (restart if unhealthy), readiness (hold traffic until ready), and startup (give slow starters time). On EKS readiness does more than gate a Service — it feeds the load balancer's target health.
Probe concept from the readingEKS realityOwner
Liveness probe → restart containerUnchanged; kubelet restartsYou define
Readiness probe → gate Service trafficAlso feeds target health via the AWS Load Balancer ControllerShared
Pod readiness gatesALB/NLB target registration can block "Ready" until the target is healthyShared
Startup probeUnchangedYou
Graceful terminationpreStop + grace period races node drain and EC2 Spot 2-minute interruptionYou design for it
Staleness callout — readiness is two decisions on EKS, not one. A pod can be Ready to Kubernetes while the ALB/NLB target is still registering, or vice versa. Pod readiness gates tie the two together so traffic only arrives once the load balancer target is healthy. Confirm current AWS Load Balancer Controller readiness-gate behaviour and target-type (IP vs instance) against AWS docs before relying on it for zero-downtime rollouts; and remember Spot gives only a ~2-minute termination warning, which your grace period must fit inside.

Questions this page should leave you able to answer

  1. When a pod runs on EKS, is "the node" an EC2 instance or a Fargate microVM — and how does that change what I manage?
  2. What does the pause/sandbox container do, and how does the VPC CNI give each pod a real VPC IP through it?
  3. Where should a pod get its AWS credentials — an init container fetching keys, or IRSA/Pod Identity?
  4. What is the difference between liveness, readiness, and startup probes, and which one the load balancer cares about?
  5. Why can a pod be Ready to Kubernetes but not yet healthy to an ALB/NLB, and what are readiness gates for?
  6. How does EC2 Spot's ~2-minute interruption constrain my pod's termination grace period?

Verified, and not

  • Grouped by title and path, not by opening every file. This review maps the topics these sources cover (lifecycle, init containers, sandbox, probes) onto AWS node, network, and health services. I did not read each file end to end; per-file detail may go deeper than the mapping above.
  • Canonical names only. Service names (EKS, AWS Fargate, EC2, Bottlerocket, containerd, Amazon VPC CNI, Amazon ECR, AWS Secrets Manager, SSM Parameter Store, IRSA, EKS Pod Identity, AWS Load Balancer Controller, EC2 Spot) are used as AWS names them. No install commands, no version pins.
  • Time-sensitive items flagged inline. Readiness-gate behaviour, load-balancer target types, Fargate pod sizing, and Spot interruption timing all move — verify against current AWS documentation before acting.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article