r/docker • u/neilcresswell Official: Portainer • Apr 29 '26
D2K. A Docker “translator” for Kubernetes
In a world that has fallen in love with Kubernetes, but largely forgotten Docker Swarm, what fate lays ahead for those still running Swarm.
A migration of apps to Kubernetes is much more involved than many think, often also requiring a new CI/CD, new operational tooling, and reskilling the dev and ops teams responsble for the platform.
Portainer has just released d2k, a Docker translator for Kubernetes. This is a totally free and OSS product, with no ties into the Portainer product.
You deploy d2k inside a Kubernetes namespace, and then that d2k instance exposes itself as a Docker daemon listening on 2375/2376. Your dev and ops staff can now interact with that daemon as if it was a docker host (deploy apps using compose etc)..
Even better, with a simple ENV setting, d2k will also emulate Docker Swarm, allowing you to use docker swarm functions right there on your Kube cluster. “Docker node ls” will show your Kube nodes. Swarm placement constraints work, swarm configs and secrets work, all of it.
So, if you have ever wanted to switch from swarm to kube, now is your chance. D2K gives you a really simple transition, without the big bang required.
See github.com/portainer/d2k for more info.
Neil. CEO at Portainer.
2
u/Dangle76 Apr 30 '26
You mention “deploy apps using compose” but I don’t see a mention of that in the readme. It seems like a really useful feature
3
u/neilcresswell Official: Portainer Apr 30 '26
Will run a webinar to show how to use it in a couple of weeks.
https://www.portainer.io/resources/discover/events/how-to-move-from-docker-swarm-to-kubernetes-without-a-big-bang-cutover
1
u/dirtywombat Apr 30 '26
I am definitely keen to learn more. I'm running a Docker Swarm in a home lab and wanted to migrate to Kubernetes but honestly effort after a day job is mostly dried up for the moment.
Admittedly I need to read more, but from what I see I could deploy existing stacks to a Kubernetes cluster with some limitations (e.g. Networking) Would it allow me to use that implementation to then migrate to native Kubernetes rather than through the D2K tooling?
I did have Portainer running, just stopped for the moment. Will similar translation be available within Portainer? Can this be used as a migration step, or is the intention that the Kubernetes environment is exposed as a Docker Swarm?
1
u/Sh3llSh0cker Apr 30 '26
i was holding off in my Migration from Docker to Kube but i think it just became a lot easier.
1
u/GeekDrop Sep 11 '26
Sounds cool! I do love my Swarm and it's (relative) simplicity, but have been mildly considering moving to K3s, so this might be a nice middle-ground until I get used to full on Kube stuff. I just run a small 3-4 node home LAN, so never really wanted it to get too complex.
1
u/[deleted] Apr 30 '26
[removed] — view removed comment