A system administrator needs to adjust the number of running instances for a Docker Swarm service named 'api-gateway'. The goal is to increase the replica count to 3. Which of the following commands correctly performs this action?
The correct command to scale a Docker Swarm service is docker service scale SERVICE_NAME=REPLICA_COUNT. In this case, docker service scale api-gateway=3 correctly targets the api-gateway service and sets the desired number of replicas to 3. The command docker service scale api-gateway 3 is incorrect because it is missing the required equals sign. The command docker service scale --replicas=3 api-gateway is incorrect as the --replicas flag is used with the docker service update command, not docker service scale. The docker swarm scale command is invalid as scaling is managed through the docker service subcommand.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are Docker Swarm services and how do they work?
Open an interactive chat with Bash
What is a replica in Docker Swarm, and why is it important?
Open an interactive chat with Bash
How does `docker service scale` differ from `docker service update`?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Automation, Orchestration, and Scripting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access