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...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .