Challenge - 5 Problems
Scaling Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Scaling a Deployment Using kubectl
You have a Kubernetes deployment named
webapp currently running 3 replicas. You run the command kubectl scale deployment webapp --replicas=5. What will be the state of the deployment after this command completes?Attempts:
2 left
💡 Hint
Think about what the --replicas flag does in the scale command.
✗ Incorrect
The
kubectl scale command sets the desired number of replicas to the specified count. It does not add to the existing number but sets it exactly. So the deployment will have 5 pods running.🧠 Conceptual
intermediate2:00remaining
Understanding Horizontal Pod Autoscaler (HPA)
Which statement correctly describes how the Horizontal Pod Autoscaler (HPA) works in Kubernetes?
Attempts:
2 left
💡 Hint
Think about what metrics HPA uses to decide scaling.
✗ Incorrect
HPA watches metrics like CPU usage and automatically increases or decreases pod replicas to meet the target utilization.
❓ Configuration
advanced3:00remaining
Configuring a Deployment for Auto Scaling
You want to create a Horizontal Pod Autoscaler for a deployment named
api-server that scales between 2 and 10 replicas based on CPU usage targeting 60%. Which YAML snippet correctly defines this HPA?Attempts:
2 left
💡 Hint
Check minReplicas and maxReplicas values and metric type.
✗ Incorrect
Option D correctly uses autoscaling/v2 API with minReplicas 2, maxReplicas 10, and CPU utilization metric targeting 60%. Option D has min and max reversed. Option D uses memory metric instead of CPU. Option D uses 'replicas' which is invalid in HPA spec.
❓ Troubleshoot
advanced2:30remaining
Troubleshooting Failed Scaling of Deployment
You applied an HPA to scale your deployment
frontend based on CPU usage, but the number of pods never changes even when CPU usage is high. Which of the following is the most likely cause?Attempts:
2 left
💡 Hint
HPA depends on metrics to decide scaling.
✗ Incorrect
HPA requires metrics-server to provide CPU usage data. Without it, HPA cannot detect load and will not scale pods.
🔀 Workflow
expert3:00remaining
Scaling Deployment with Zero Downtime
You need to scale your
payment-service deployment from 3 to 6 replicas without causing downtime. Which sequence of commands ensures zero downtime during scaling?Attempts:
2 left
💡 Hint
Think about how Kubernetes manages pods during scaling and rollout.
✗ Incorrect
Scaling with
kubectl scale increases replicas without deleting pods, and kubectl rollout status waits for pods to be ready, ensuring zero downtime. Deleting pods manually or undoing rollout can cause downtime or revert changes.