Kubernetes
Easy
Commands
Which command would you use to scale a deployment named 'nginx-deployment' to 5 replicas?
Select your answer:
Show answer and explanation
Answer: kubectl scale deployment nginx-deployment --replicas=5
Explanation
The 'kubectl scale deployment nginx-deployment --replicas=5' command is used to scale a deployment to a specified number of replicas. This adjusts the number of pods managed by the deployment.
More easy Kubernetes questions
- Which kubectl command would you use to view all pods in all namespaces?
- Which command would you use to create a new namespace called 'development'?
- Which kubectl command would you use to edit a running deployment named 'web-app'?
- What is the purpose of a Kubernetes Secret?
- Which kubectl command would you use to view the resource usage of pods?
- What happens when you apply a resource that already exists in the cluster?