Q. Which command drains a node so it stops receiving new tasks?

  • (A) docker node update --availability drain <node>
  • (B) docker node disable <node>
  • (C) docker swarm drain <node>
  • (D) docker node demote <node>
πŸ’¬ Discuss
βœ… Correct Answer: (A) docker node update --availability drain <node>
Explanation: Setting availability to drain migrates running tasks away and prevents new ones from being scheduled.

Q. What built-in network encrypts container traffic automatically between Swarm nodes?

  • (A) ingress
  • (B) host
  • (C) encrypted overlay
  • (D) bridge
πŸ’¬ Discuss
βœ… Correct Answer: (C) encrypted overlay
Explanation: Creating an overlay with --opt encrypted enables IPSEC tunneling to secure inter-node traffic.

Q. Which directive in a service update controls how many tasks are updated simultaneously?

  • (A) --update-parallelism
  • (B) --rollback-delay
  • (C) --replicas
  • (D) --limit-rate
πŸ’¬ Discuss
βœ… Correct Answer: (A) --update-parallelism
Explanation: --update-parallelism sets the number of tasks that Docker updates at one time during a rollout.

Q. How can you pause a rolling update for a Swarm service?

  • (A) docker service pause <service>
  • (B) docker service update --rollback <service>
  • (C) docker service update --update-pause <seconds>
  • (D) docker service stop <service>
πŸ’¬ Discuss
βœ… Correct Answer: (C) docker service update --update-pause <seconds>
Explanation: The --update-pause flag configures the delay between update batches, effectively pausing deployments.

Q. Which feature stores sensitive data such as passwords directly in Swarm’s Raft store?

  • (A) Configs
  • (B) Volumes
  • (C) Secrets
  • (D) Labels
πŸ’¬ Discuss
βœ… Correct Answer: (C) Secrets
Explanation: docker secret create uploads encrypted data to the Raft store and delivers it only to tasks that need it.

Q. What scheduler strategy spreads tasks evenly across nodes by default?

  • (A) binpack
  • (B) spread
  • (C) random
  • (D) priority
πŸ’¬ Discuss
βœ… Correct Answer: (B) spread
Explanation: Swarm’s default spread strategy balances tasks to use resources evenly across available nodes.

Q. Which command rolls back a service to the previous working configuration?

  • (A) docker service revert <service>
  • (B) docker service rollback <service>
  • (C) docker service undo <service>
  • (D) docker swarm rollback <service>
πŸ’¬ Discuss
βœ… Correct Answer: (B) docker service rollback <service>
Explanation: docker service rollback returns a service to its last stable version and task template.

Q. What is the minimum recommended number of manager nodes for high availability?

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 5
πŸ’¬ Discuss
βœ… Correct Answer: (C) 3
Explanation: A three-manager quorum tolerates the loss of one manager while still maintaining consensus.

Q. Which flag specifies the maximum number of task failures allowed during an update before rollback?

  • (A) --update-max-failure-ratio
  • (B) --update-monitor
  • (C) --rollback-parallelism
  • (D) --health-failures
πŸ’¬ Discuss
βœ… Correct Answer: (A) --update-max-failure-ratio
Explanation: If the fraction of failed tasks exceeds this ratio, Swarm aborts the update and rolls back.

Q. Which built-in network handles external load-balanced traffic to Swarm services?

  • (A) ingress
  • (B) frontend
  • (C) gateway
  • (D) macvlan
πŸ’¬ Discuss
βœ… Correct Answer: (A) ingress
Explanation: The ingress overlay network receives incoming connections and routes them to service tasks.