Bird
0
0

Which Kubernetes resources should you define in your deployment manifests to achieve this?

hard📝 Best Practice Q8 of 15
AWS - EKS
You need to deploy a stateless web service on EKS that scales automatically between 3 and 10 pods based on CPU utilization. Which Kubernetes resources should you define in your deployment manifests to achieve this?
AA DaemonSet to run one pod per node and a ClusterAutoscaler to manage node count
BA StatefulSet with replicas set to 10 and a PodDisruptionBudget to limit scaling
CA Deployment with replicas set to 3 and a HorizontalPodAutoscaler targeting CPU usage with minReplicas 3 and maxReplicas 10
DA Deployment with replicas set to 10 and manual scaling using kubectl scale commands
Step-by-Step Solution
Solution:
  1. Step 1: Use Deployment for stateless apps

    Deployments manage stateless pods and support rolling updates.
  2. Step 2: Set initial replicas

    Set replicas to the minimum desired pods (3) to ensure baseline availability.
  3. Step 3: Configure HorizontalPodAutoscaler (HPA)

    HPA automatically scales pods between minReplicas and maxReplicas based on CPU metrics.
  4. Final Answer:

    A Deployment with replicas set to 3 and a HorizontalPodAutoscaler targeting CPU usage with minReplicas 3 and maxReplicas 10 -> Option C
  5. Quick Check:

    Deployment + HPA for autoscaling [OK]
Quick Trick: Use Deployment + HPA for CPU-based autoscaling [OK]
Common Mistakes:
  • Using StatefulSet for stateless apps
  • Relying on manual scaling instead of HPA
  • Using DaemonSet which runs one pod per node

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes