Docker Swarm MCQs with answers Page - 1

You will find multiple-choice questions (MCQs) related to #Docker Swarm here. Go through these questions to prepare effectively for your upcoming exams and interviews.

To view the correct answer for any question, simply click the "Show Answer" button.

Have a question to share? Click on "Add Question" to contribute!

A

Admin • 828.03K Points
Coach

Q. What is Docker Swarm used for?

  • (A) Building Docker images
  • (B) Creating container volumes
  • (C) Orchestrating multiple Docker containers across multiple nodes
  • (D) Logging Docker output

A

Admin • 828.03K Points
Coach

Q. What command is used to initialize a Docker Swarm?

  • (A) docker swarm init
  • (B) docker swarm create
  • (C) docker swarm start
  • (D) docker swarm up

A

Admin • 828.03K Points
Coach

Q. Which command adds a new node to the Swarm as a worker?

  • (A) docker swarm join --manager
  • (B) docker swarm add --worker
  • (C) docker swarm join
  • (D) docker swarm node add

A

Admin • 828.03K Points
Coach

Q. Which command shows the nodes in a Swarm cluster?

  • (A) docker swarm list
  • (B) docker node ls
  • (C) docker swarm status
  • (D) docker cluster show

A

Admin • 828.03K Points
Coach

Q. What is a service in Docker Swarm?

  • (A) A container log
  • (B) A configuration file
  • (C) A definition for a task to be executed by the swarm
  • (D) An image pulled from Docker Hub

A

Admin • 828.03K Points
Coach

Q. Which command deploys a new service in Docker Swarm?

  • (A) docker create service
  • (B) docker swarm run
  • (C) docker service create
  • (D) docker run service

A

Admin • 828.03K Points
Coach

Q. What is the default number of replicas if not specified when creating a Swarm service?

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 0

A

Admin • 828.03K Points
Coach

Q. How does Docker Swarm handle load balancing?

  • (A) Using a third-party plugin
  • (B) Via built-in routing mesh
  • (C) Through NGINX
  • (D) It does not handle load balancing

A

Admin • 828.03K Points
Coach

Q. What happens when a Swarm manager node fails?

  • (A) All containers stop
  • (B) The Swarm becomes unusable
  • (C) A new manager is elected from the other manager nodes
  • (D) Docker Swarm shuts down

A

Admin • 828.03K Points
Coach

Q. What is the role of a worker node in Docker Swarm?

  • (A) Manage other nodes
  • (B) Deploy services and manage tasks
  • (C) Maintain service states
  • (D) Only logs events
What's Tag

As you may know, questions are organized under broad categories. Each category can include various types of questions. For example, the "History" category might contain questions about the Revolt of 1857, Shivaji Maharaj, Ancient History, Buddhism, and more.

To further refine this organization, we've introduced tags, which act as sub-categories to group questions more specifically.

Verified users can add tags to any question. If you have any suggestions regarding this system, we'd love to hear from you. Contact Us

Learn More