Recall & Review
beginner
What is the purpose of scaling a deployment in Kubernetes?
Scaling a deployment adjusts the number of pod replicas to handle more or less workload, ensuring the application can meet demand efficiently.
Click to reveal answer
beginner
Which command scales a deployment named 'webapp' to 5 replicas?
kubectl scale deployment webapp --replicas=5
Click to reveal answer
intermediate
What is the difference between manual and automatic scaling in Kubernetes?
Manual scaling requires you to specify the number of replicas yourself. Automatic scaling uses metrics like CPU usage to adjust replicas automatically.
Click to reveal answer
intermediate
What Kubernetes resource is used for automatic scaling of deployments?
The Horizontal Pod Autoscaler (HPA) automatically adjusts the number of pod replicas based on observed metrics like CPU or memory usage.
Click to reveal answer
beginner
How do you check the current number of replicas for a deployment named 'api-server'?
Use the command: kubectl get deployment api-server to see the current replicas and status.
Click to reveal answer
Which command scales a deployment named 'frontend' to 3 replicas?
✗ Incorrect
The correct syntax to scale a deployment is 'kubectl scale deployment --replicas='.
What does the Horizontal Pod Autoscaler (HPA) use to decide when to scale pods?
✗ Incorrect
HPA automatically scales pods based on resource usage metrics such as CPU or memory.
If you want to reduce the number of replicas from 10 to 4 manually, which command would you use?
✗ Incorrect
Scaling is done with 'kubectl scale deployment --replicas='.
How can you view the current number of replicas and their status for a deployment?
✗ Incorrect
'kubectl get deployment ' shows the number of replicas and their current status.
Which of the following is NOT a benefit of scaling deployments?
✗ Incorrect
Scaling helps with traffic and resource management but does not fix code bugs automatically.
Explain how you would manually scale a Kubernetes deployment and why you might want to do this.
Think about adjusting the number of pods to match demand.
You got /4 concepts.
Describe what the Horizontal Pod Autoscaler does and how it helps manage deployments.
Consider how Kubernetes can watch resource use and change pod count.
You got /4 concepts.