docker node ls is showing only master node in Azure

I have created container environment in Azure. However, while running docker node ls, it is only showing LEADER node. but not showing agent node here. Please help.

Thanks


When you run the command to create a swarm, the Docker Engine starts running in swarm mode.

Run docker swarm init to create a single-node swarm on the current node. The Engine sets up the swarm as follows:

  • switches the current node into swarm mode.
  • creates a swarm named default.
  • designates the current node as a leader manager node for the swarm.
  • names the node with the machine hostname.
  • configures the manager to listen on an active network interface on port 2377.
  • sets the current node to Active availability, meaning it can receive tasks from the scheduler.
  • starts an internal distributed data store for Engines participating in the swarm to maintain a consistent view of the swarm and all services running on it.
  • by default, generates a self-signed root CA for the swarm.
  • by default, generates tokens for worker and manager nodes to join the swarm. creates an overlay network named ingress for publishing service ports external to the swarm.
  • creates an overlay default IP addresses and subnet mask for your networks The output for docker swarm init provides the connection command to use when you join new worker nodes to the swarm:

Illustration here

Reference: https://docs.docker.com/engine/swarm/swarm-mode/#create-a-swarm

For more information see Join a worker node

Once a worker node has joined the swarm docker docker node ls should give you the list of nodes joined to the swarm. [Reference]