Bird
0
0

Which of the following is true about the docker swarm init command?

easy📝 Conceptual Q2 of 15
Docker - Swarm
Which of the following is true about the docker swarm init command?
AIt can only be run on a Linux host
BIt disables swarm mode
CIt automatically adds worker nodes
DIt creates a new swarm cluster if none exists
Step-by-Step Solution
Solution:
  1. Step 1: Check what docker swarm init does

    This command creates a new swarm cluster if the Docker engine is not already part of one.
  2. Step 2: Verify other options

    It does not restrict OS, does not add workers automatically, and does not disable swarm mode.
  3. Final Answer:

    It creates a new swarm cluster if none exists -> Option D
  4. Quick Check:

    Swarm init creates cluster = true [OK]
Quick Trick: Init creates cluster only if none exists [OK]
Common Mistakes:
  • Assuming it adds workers automatically
  • Thinking it disables swarm mode
  • Believing it only works on Linux

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes