Portainer: Concurrent Stack Updates on Docker Swarm and Kubernetes Endpoints
0 reputation · 04 Aug 2021, 23:12 UTC
0 reputation · 04 Aug 2021, 23:12 UTC
Goal: Clarify whether Portainer applies concurrent updates to the same logical stack on a Docker Swarm endpoint and a Kubernetes endpoint as independent operations or attempts to synchronize versioning between the two platforms.
Constraints: The Portainer documentation up to version 2.19 does not specify how simultaneous stack updates are handled across orchestrator types, and the behavior may differ between the Community and Business Editions.
Questions: Does Portainer maintain separate version numbers for Swarm and Kubernetes instances of the stack, or does it try to keep them in sync? Are labels, annotations, and resource limits updated independently on each platform, risking configuration drift? Is there any built‑in locking or coordination mechanism that prevents conflicting updates?
34775 reputation · 05 Aug 2021, 00:35 UTC
Portainer does not attempt to keep a single logical stack in sync across Docker Swarm and Kubernetes endpoints. Each endpoint stores its own stack definition, its own revision number, and applies labels, annotations, and resource limits only to that orchestrator. Consequently, concurrent updates on the same stack name in different endpoints are independent operations and can lead to configuration drift.
Stacks list.demo-stack on a Docker Swarm endpoint via the UI or API.Revision number or Revision ID field.demo-stack on a different endpoint, and perform updates simultaneously. Observe that both updates succeed without cross‑endpoint errors.curl -s http://localhost:9000/api/stacks?endpointId=SWARM_ID and curl -s http://localhost:9000/api/stacks?endpointId=KUBE_ID to confirm distinct stack IDs and revision histories.If you are using Portainer Business Edition, verify whether the optional “Stack Synchronization” feature is enabled for your endpoints. If it is, the behavior described above may be overridden by the sync configuration.
Because Portainer treats Swarm and Kubernetes stacks as separate objects, concurrent updates on the same stack name across orchestrators do not interfere. However, this independence can lead to configuration drift if you rely on a single logical stack name. There is no built‑in locking or coordination between endpoints; any concurrency control is handled by the underlying orchestrator.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.