DevOps Tools Engineer (LPIC-OT 701) — Question 44
Which of the following commands lists the nodes in a Docker Swam cluster?
Answer options
- A. docker-swarm listnodes
- B. docker engine ls
- C. docker node ls
- D. docker machine ls
- E. docker swarm nodes
Correct answer: C
Explanation
The correct command to list the nodes in a Docker Swarm cluster is 'docker node ls', which specifically retrieves the list of nodes. The other options either do not exist or are intended for different functionalities, such as managing Docker machines or engines, rather than listing Swarm nodes.