Feedback

Chat Icon

Painless Docker - 2nd Edition

A Comprehensive Guide to Mastering Docker and its Ecosystem

Deploying Applications on Docker Swarm: A Practical Guide
89%

Docker Swarm Global Services

A global service is a service that runs one task on each node in the cluster. This mode is also referred to as the global mode.

Let's say you want to run a logging agent on every node in the cluster to collect logs from all the containers. To achieve this, you need to ensure two things:

  • The logging agent should run on all nodes.
  • Only one instance of the logging agent should be running on each node.

In the following example, we'll be using Fluentd as the logging agent. To create a global service, run the following command on the manager node and include the --mode global option:

docker service create \

Painless Docker - 2nd Edition

A Comprehensive Guide to Mastering Docker and its Ecosystem

Enroll now to unlock all content and receive all future updates for free.

Unlock now  $31.99$25.59

Hurry! This limited time offer ends in:

To redeem this offer, copy the coupon code below and apply it at checkout:

Learn More