Bird
0
0

You want to automatically scale a deployment named webapp between 2 and 10 replicas based on CPU usage. Which Kubernetes resource should you create?

hard📝 Workflow Q8 of 15
Kubernetes - ReplicaSets and Deployments
You want to automatically scale a deployment named webapp between 2 and 10 replicas based on CPU usage. Which Kubernetes resource should you create?
AHorizontalPodAutoscaler
BReplicaSet
CStatefulSet
DDaemonSet
Step-by-Step Solution
Solution:
  1. Step 1: Identify resource for automatic scaling

    HorizontalPodAutoscaler adjusts replicas based on metrics like CPU.
  2. Step 2: Exclude other resources

    ReplicaSet manages fixed replicas, StatefulSet manages stateful pods, DaemonSet runs pods on all nodes.
  3. Final Answer:

    HorizontalPodAutoscaler -> Option A
  4. Quick Check:

    Auto scaling uses HorizontalPodAutoscaler [OK]
Quick Trick: Use HorizontalPodAutoscaler for CPU-based scaling [OK]
Common Mistakes:
  • Confusing ReplicaSet with autoscaling
  • Using StatefulSet for scaling
  • Thinking DaemonSet scales pods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes