[No Audio]
Now that both the nodes have joined the cluster as
workers, let's verify it using docker node ls command.
Take a note, that this is part of Docker's Swarm command line.
Once we hit enter, we get all
of the three nodes along with their hostnames.
All of them have their status as Ready and
availability as Active. And if you can notice,
manager also has the status of being Leader.
This is applicable when we have a cluster with more
than one manager. In which case, one of the
managers will act as Leader. There is no confusion
here since we only have one manager and two worker
nodes, so our manager will be Leader by default.
Now we can inspect our manager and worker nodes
from managers shell itself.
Let's type docker node inspect followed by self,
along with '--pretty' flag. We are mentioning self, because manager wants
to inspect itself. And as you can see, what we get
is the node ID, its Hostname, joining timestamp,
Status, and some other information like Platform,
Resources, Engine Version, which is Docker engine
version. Here it is 18.0 6.1 Community Edition and
some security certificates. We can hit the command
for worker-1 and 2 as well and we get
respective information about both of them.
As you can see, all of these three nodes have different
IP, but rest of the things are pretty much the
same. Of course, the roles are different,
which will be explored in further demos.