ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 138 - DCA discussion

Report
Export

Will this command list all nodes in a swarm cluster from the command line?

Solution. 'docker inspect nodes

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

= The commanddocker inspect nodeswill not list all nodes in a swarm cluster from the command line.This command is invalid, asdocker inspectrequires one or more object names or IDs as arguments1.To list all nodes in a swarm cluster, you need to use thedocker node lscommand from a manager node2.This command will display the ID, hostname, status, availability, manager status, and engine version of each node in the swarm2.You can also use the-for--filterflag to filter the nodes by various criteria, such as role, label, or name2.Reference:

1: docker inspect | Docker Docs

2: docker node ls | Docker Docs

asked 08/11/2024
Guillermo Fontaine
47 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first