Endpoints

However, we can add our two remaining cluster nodes to Portainer. To do this, click on the Endpoint entry in the left-hand menu.

To add the endpoint, we will need to know the endpoint URL and have access to the certificates so that Portainer can authenticate itself against the Docker daemon running on the node. Luckily, as we launched the hosts using Docker Machine, this is a simple task. To get the endpoint URLs, run the following command:

$ docker-machine ls

For me, the two endpoint URLs were 192.168.99.101:2376 and 192.168.99.102:2376; yours may be different. The certificates we need to upload can be found in the ~/.docker/machine/certs/ folder on your machine. I recommend running the following commands to open the folder in your finder:

$ cd ~/.docker/machine/certs/
$ open .

Once you have added the node, you will be able to change to it using the Active Endpoint drop-down menu in the top left of the Portainer page. As you can see from the following screenshot, we can see that swarm-worker-01 is running two containers and that it is in a swarm cluster as a worker node:

You will also notice that other than the small Swarm info section on the Dashboard, there's no mention of Swarm services. Again, this is because Portainer only knows as much as your Docker nodes, and Swarm mode only allows nodes with the role of manager to launch services and tasks and interact with the other nodes in your cluster.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset