KCNA · Question #218
What methods can you use to scale a deployment?
The correct answer is C. With kubectl scale deployment and kubectl edit deployment. Kubernetes Deployments can be scaled directly using the kubectl scale deployment command or by modifying the replicas field in the deployment's manifest via kubectl edit deployment.
Question
What methods can you use to scale a deployment?
Options
- AWith exclusively.
- BWith kubectl scale-up deployment exclusively.
- CWith kubectl scale deployment and kubectl edit deployment.
- DWith kubectl scale deployment exclusively.
How the community answered
(24 responses)- A4% (1)
- C92% (22)
- D4% (1)
Why each option
Kubernetes Deployments can be scaled directly using the `kubectl scale deployment` command or by modifying the `replicas` field in the deployment's manifest via `kubectl edit deployment`.
This option is incomplete and doesn't specify any actual command or method for scaling.
`kubectl scale-up deployment` is not a valid or standard kubectl command for scaling a deployment.
You can scale a Deployment using `kubectl scale deployment <deployment-name> --replicas=<count>` for immediate replica adjustments, or by editing the Deployment's YAML configuration, specifically the `spec.replicas` field, using `kubectl edit deployment <deployment-name>`.
While `kubectl scale deployment` is a valid method, stating it's the exclusive method is incorrect, as editing the deployment manifest (e.g., via `kubectl edit`) is also a common way to scale.
Concept tested: Kubernetes Deployment scaling methods
Source: https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/#scale-the-deployment
Topics
Community Discussion
No community discussion yet for this question.