Actions88
- Container Actions
- Container List
- Container Create
- Container Inspect
- Container Top
- Container Logs
- Container Changes
- Container Export
- Container Stats
- Container Resize
- Container Start
- Container Stop
- Container Restart
- Container Kill
- Container Update
- Container Rename
- Container Pause
- Container Unpause
- Container Attach
- Container Attach Websocket
- Container Wait
- Container Delete
- Container Archive Info
- Container Archive
- Put Container Archive
- Container Prune
- Image Actions
- Network Actions
- Volume Actions
- Swarm Actions
- Node Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
Overview
This node allows you to interact with Docker through the Portainer API, specifically enabling you to join a Docker Swarm cluster. The "Swarm Join" operation lets a Docker engine join an existing swarm by providing the necessary join parameters in the request body.
Common scenarios for this node include automating Docker Swarm cluster management, such as adding new nodes to a swarm programmatically or integrating swarm operations into CI/CD pipelines.
For example, you can use this node to add a new worker node to your Docker Swarm by specifying the appropriate join token and manager address in the body property.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | Select the Docker endpoint (Portainer environment) where the swarm join command will be executed. You can choose from a list of available endpoints or specify an ID using an expression. |
| Body | JSON string containing the parameters required to join the swarm. This typically includes the join token, remote manager address, and other swarm join options. |
Output
The node outputs the JSON response returned by the Portainer API after attempting to join the swarm. This usually contains confirmation details or error messages related to the join operation.
No binary data output is produced by this node.
Dependencies
- Requires access to a Portainer instance with API enabled.
- Requires an API key credential for authenticating requests to the Portainer API.
- The node depends on the Portainer API's
/api/endpoints/{endpointId}/docker/swarm/joinendpoint. - The user must have at least one Docker endpoint configured in Portainer to select from.
Troubleshooting
Common issues:
- Invalid or missing join token in the body will cause the join operation to fail.
- Incorrect endpoint selection may lead to connection errors.
- Network connectivity issues between n8n and the Portainer server.
Error messages:
- Authentication errors if the API key credential is invalid or missing.
- HTTP 400 or 403 errors if the join parameters are incorrect or insufficient permissions.
Resolutions:
- Verify the correctness of the join token and other parameters in the body.
- Ensure the selected endpoint is correct and accessible.
- Confirm that the API key credential has sufficient permissions.
- Check network connectivity and Portainer API availability.