Bird
0
0

You run docker service scale myservice=5 but only 3 containers start. What is the likely cause?

medium📝 Troubleshoot Q14 of 15
Docker - Production Patterns
You run docker service scale myservice=5 but only 3 containers start. What is the likely cause?
AThe command syntax is wrong
BThe service name is incorrect
CDocker daemon is not running
DNot enough resources on swarm nodes to run 5 replicas
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the scaling command

    The command syntax is correct and service name is assumed valid since some containers started.
  2. Step 2: Identify resource constraints

    If only 3 replicas run instead of 5, likely the swarm nodes lack enough CPU/memory to start all replicas.
  3. Final Answer:

    Not enough resources on swarm nodes to run 5 replicas -> Option D
  4. Quick Check:

    Scaling fails due to resource limits [OK]
Quick Trick: Scaling fails if swarm nodes lack resources [OK]
Common Mistakes:
  • Assuming command syntax is wrong
  • Thinking service name is invalid if some replicas run
  • Ignoring resource limits on nodes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes