DCA · Question #37
You have just executed 'docker swarm leave' on a node. What command can be run on the same node to confirm it has left the cluster?
The correct answer is B. docker system info. To confirm that a node has successfully left a Docker Swarm cluster, the docker system info command can be used.
Question
You have just executed 'docker swarm leave' on a node. What command can be run on the same node to confirm it has left the cluster?
Options
- Adocker node ls
- Bdocker system info
- Cdocker system status
- Ddocker system status
How the community answered
(25 responses)- B96% (24)
- D4% (1)
Why each option
To confirm that a node has successfully left a Docker Swarm cluster, the `docker system info` command can be used.
The `docker node ls` command is used by a manager node to list nodes currently in an active swarm; a node that has left the swarm cannot execute this command to check its own swarm status.
After a node executes `docker swarm leave`, running `docker system info` on that specific node will display detailed information about the Docker daemon, including a 'Swarm' section that will indicate 'inactive', thereby confirming it is no longer part of a swarm.
`docker system status` is not a valid Docker CLI command.
`docker system status` is not a valid Docker CLI command (repeated from C).
Concept tested: Verifying Docker Swarm node status
Source: https://docs.docker.com/engine/reference/commandline/system_info/
Topics
Community Discussion
No community discussion yet for this question.