
Answer-first summary for fast verification
Answer: Use the `kubectl scale deployment` command with the `--replicas 4` parameter.
The correct command to increase the number of replicas to 4 is `kubectl scale deployment` with the `--replicas 4` parameter. This command scales the deployment to the specified number of replicas. The `--deploy` parameter does not exist in the `kubectl scale deployment` command. For more details, refer to the Kubernetes documentation on deployments: [https://kubernetes.io/docs/concepts/workloads/controllers/deployment/](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have a machine learning model containerized and deployed on Kubernetes Engine with 2 replicas. To enhance its availability, you decide to increase the number of replicas to 4. Which command should you use?
A
Execute the kubectl scale deployment command with the --deploy 4 parameter.
B
Use the kubectl scale deployment command with the --replicas 4 parameter.
C
Run the kubectl scale deployment command with the --deploy 2 parameter.
D
Apply the kubectl scale deployment command with the --replicas 2 parameter.
No comments yet.