AWS Certified DevOps Engineer – ProfessionalIncident and Event ResponseMedium

A DevOps team manages a critical microservices application deployed on Amazon EKS. They need to ensure that if any pod in a specific deployment fails its readiness probe or becomes unhealthy, it is automatically replaced with a new, healthy pod to maintain application availability. The team wants to leverage native Kubernetes features for this self-healing capability. Which Kubernetes component is primarily responsible for ensuring the desired number of healthy pods are running for a deployment?

  1. AService
  2. BIngress
  3. CReplicaSet
  4. DConfigMap
Show answer & explanation

Correct answer: C. ReplicaSet

A ReplicaSet is a Kubernetes controller that ensures a specified number of replica Pods are running at any given time. If a Pod fails its readiness probe or becomes unhealthy, the ReplicaSet will automatically terminate it and create a new one to maintain the desired count, thus providing self-healing for deployments.

Why the other options are wrong

  • A. A Kubernetes Service provides stable network access to a set of Pods but does not manage their lifecycle or health.
  • B. Ingress manages external access to services within the cluster, typically HTTP/S routing, but does not manage pod health or replication.
  • D. ConfigMaps store non-sensitive configuration data in key-value pairs and are not involved in managing pod health or replication.

Kubernetes ReplicaSet

A ReplicaSet is a Kubernetes controller that maintains a stable set of replica Pods running at any given time, ensuring the desired number of healthy Pods for a deployment.

  • Ensures a specified number of Pod replicas.
  • Replaces unhealthy or terminated Pods automatically.
  • Often managed indirectly by Deployments.

Memory trick: ReplicaSet keeps your Pods healthy and ready, always.

More Incident and Event Response questions