feat: Docker Swarm API emulation on Kubernetes#17
Merged
stevensbkang merged 3 commits intoportainer:developfrom Apr 16, 2026
Merged
feat: Docker Swarm API emulation on Kubernetes#17stevensbkang merged 3 commits intoportainer:developfrom
stevensbkang merged 3 commits intoportainer:developfrom
Conversation
Implements the Docker Swarm API surface backed by Kubernetes, allowing
existing Swarm toolchains (Docker CLI, Portainer) to transparently use
a Kubernetes cluster as a Swarm backend.
Endpoints implemented:
- GET/POST /swarm, /swarm/init, /swarm/leave
- GET/POST /nodes, /nodes/{id}, /nodes/{id}/update
- POST /services/create, GET /services, GET/POST/DELETE /services/{id}
- GET /services/{id}/logs (multiplexed stream with swarm details context)
- GET /tasks, GET /tasks/{id}
- POST/GET/DELETE /secrets, /configs
- GET /stacks, DELETE /stacks/{name}
- GET/POST/DELETE /networks (with label filtering)
Tested and confirmed working:
- docker service create/ls/scale/update/rm with progress convergence
- docker service logs and --follow with context cancellation
- docker stack deploy/ls/ps/rm alongside standalone services
- docker secret and docker config CRUD
- Portainer Swarm cluster view, networks, services, stacks
stevensbkang
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the Docker Swarm API surface backed by Kubernetes, allowing existing Swarm toolchains (Docker CLI, Portainer) to transparently use a Kubernetes cluster as a Swarm backend.
Endpoints implemented:
Tested and confirmed working: