Docker Swarm MCQs with answers Page - 2

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.43K Points
Coach

Q. What command updates the image of a running service?

  • (A) docker service upgrade
  • (B) docker update image
  • (C) docker service update
  • (D) docker image update

A

Admin • 828.43K Points
Coach

Q. Which command removes a service in Docker Swarm?

  • (A) docker service remove
  • (B) docker rm service
  • (C) docker swarm delete
  • (D) docker service down

A

Admin • 828.43K Points
Coach

Q. How do you scale a service in Docker Swarm?

  • (A) docker scale service
  • (B) docker service scale
  • (C) docker service resize
  • (D) docker swarm scale

A

Admin • 828.43K Points
Coach

Q. What is a task in Docker Swarm?

  • (A) A Dockerfile step
  • (B) A single running container
  • (C) A log entry
  • (D) A plugin

A

Admin • 828.43K Points
Coach

Q. Which of the following best describes a manager node?

  • (A) Runs background tasks
  • (B) Only deploys containers
  • (C) Manages the cluster and schedules tasks
  • (D) Monitors the health of services only

A

Admin • 828.43K Points
Coach

Q. What is the main purpose of the Raft protocol in Swarm?

  • (A) Encrypt container logs
  • (B) Share files across containers
  • (C) Maintain consensus and state across manager nodes
  • (D) Distribute Docker images

A

Admin • 828.43K Points
Coach

Q. Which of the following commands demotes a manager to a worker?

  • (A) docker node demote
  • (B) docker swarm demote
  • (C) docker manager down
  • (D) docker node update --role worker

A

Admin • 828.43K Points
Coach

Q. How do you leave a Docker Swarm?

  • (A) docker swarm exit
  • (B) docker leave
  • (C) docker swarm leave
  • (D) docker node remove

A

Admin • 828.43K Points
Coach

Q. What happens if all manager nodes are lost in a Swarm?

  • (A) Worker nodes become managers
  • (B) Cluster state is lost unless a backup is available
  • (C) Docker automatically recreates managers
  • (D) Swarm switches to legacy mode

A

Admin • 828.43K Points
Coach

Q. What command promotes a worker to manager?

  • (A) docker promote node
  • (B) docker node promote
  • (C) docker swarm promote
  • (D) docker node manager
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