DCA practice question 20 of 25
Will this command list all nodes in a swarm cluster from the command line? Solution: 'docker node Is'
Full set: 191 questionsThe command docker node ls is the correct and standard command to list all nodes that are part of a Docker Swarm cluster. When executed on a manager node, it provides a table of information for each node, including its ID, hostname, availability, manager status, and engine version. The ls is an alias for list. This command is the primary tool for administrators to view the current state and membership of the swarm cluster from the command line.
B. No: This is incorrect. The official Docker documentation and command-line reference explicitly define docker node ls as the command for listing swarm nodes.
1. Docker Inc. (2024). docker node ls. Docker Documentation, Command-line reference. Retrieved from https://docs.docker.com/engine/reference/commandline/nodels/. (The main description states: "Lists the nodes in the swarm.")
2. Docker Inc. (2024). Manage swarm service. Docker Documentation. Retrieved from https://docs.docker.com/engine/swarm/swarm-tutorial/deploy-service/. (In "Step 3: Deploy the service on the swarm", the tutorial uses docker node ls to verify the nodes in the swarm.)
Keep practicing
Take the free DCA practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DCA practice questions
- Question 1Does this command create a swarm service that only listens on port 53 using the UDP proto…
- Question 2Will this command ensure that overlay traffic between service tasks is encrypted? Solutio…
- Question 4Does this describe the role of Control Groups (cgroups) when used with a Docker container…
- Question 5Can this set of commands identify the published port(s) for a container? Solution: docker…
- Question 6Will this command mount the host's '/data' directory to the ubuntu container in read-only…
- Question 7A company's security policy specifies that development and production containers must run…
