{"slug": "building-a-hybrid-docker-orchestrator-in-go-the-journey-from-single-vm-to-multi", "title": "Building a Hybrid Docker Orchestrator in Go: The Journey from Single VM to Multi-Node Cluster", "summary": "A developer built Gubernator, a lightweight container orchestrator in Go that combines Docker Compose simplicity with Nomad-like decentralized targeting. The project evolved from a single-node API to a multi-node VM cluster with autonomous DNS resolution and local ingress routing, co-authored with Google DeepMind's Antigravity AI pair programmer. Gubernator uses SQLite, CoreDNS, and Caddy to provide a fast, decentralized alternative to Kubernetes for small-to-medium deployments.", "body_md": "What if you could combine the native simplicity of **Docker Compose** with the decentralized targeting and reliability of **HashiCorp Nomad**?\n\nMeet **Gubernator** (or `gbnt`\n\n), a \"Goldilocks\" container orchestrator written in Go. In this post, I want to share how I took Gubernator from a single-node API to a fully decentralized, multi-node VM cluster with autonomous DNS resolution and local ingress routing—all co-authored alongside **Antigravity**, Google DeepMind's agentic AI pair programmer.\n\nKubernetes is the undisputed king of container orchestration, but for small-to-medium projects, homelabs, or edge deployments, it represents massive operational overhead. Docker Swarm is simple but lacks fine-grained task scheduling constraints.\n\nGubernator is designed to fill that sweet spot:\n\n`gbnt`\n\nbinary acts as the Central Manager (holding the centralized SQLite state) and the Worker Agents.To test the orchestrator realistically, we provisioned three Multipass Ubuntu VMs:\n\n`gbnt-manager`\n\n(`192.168.252.8`\n\n)`gbnt-worker1`\n\n(`192.168.252.9`\n\n)`gbnt-worker2`\n\n(`192.168.252.10`\n\n)\n\n``` php\ngraph TD\n    Host[Mac/Laptop Host OS] -->|Resolves *.gbnt via local resolver| CoreDNS_Manager\n    subgraph Manager VM [gbnt-manager: 192.168.252.8]\n        CoreDNS_Manager[gbnt-coredns]\n        Mgr[gbnt-manager API & DB]\n        Caddy_Mgr[gbnt-caddy]\n    end\n    subgraph Worker 1 VM [gbnt-worker1: 192.168.252.9]\n        Agent1[gbnt Agent]\n        Caddy1[gbnt-caddy]\n        CoreDNS1[gbnt-coredns]\n        Cont1[App Containers]\n    end\n    subgraph Worker 2 VM [gbnt-worker2: 192.168.252.10]\n        Agent2[gbnt Agent]\n        Caddy2[gbnt-caddy]\n        CoreDNS2[gbnt-coredns]\n        Cont2[App Containers]\n    end\n\n    Mgr -->|Orchestrates| Agent1 & Agent2\n    CoreDNS_Manager -->|Synchronizes Records| CoreDNS1 & CoreDNS2\n    Caddy1 -->|Routes to local| Cont1\n    Caddy2 -->|Routes to local| Cont2\n```\n\nOne of the biggest challenges in multi-host networking is how to route web traffic to containers without overloading the Manager.\n\nInstead of routing all external traffic through a single ingress proxy on the Manager, we built a fully decentralized routing scheme:\n\n`hello-app.gbnt`\n\n) pointing directly to the IP of the Worker VM hosting the container.This means if `hello-app.gbnt`\n\nis deployed on `gbnt-worker2`\n\n(`192.168.252.10`\n\n):\n\n`192.168.252.10`\n\n.`gbnt-worker2`\n\non port 80.`172.17.0.2:80`\n\n).What makes this project unique is that **100% of the Go code, GORM integrations, Flutter dashboard widgets, and cluster setups were co-authored with Antigravity**, Google DeepMind's agentic AI coding assistant.\n\nUnlike simple autocomplete or chat windows, Antigravity acts as a pair programmer with agentic capabilities:\n\n`bridge`\n\nand `gbnt-monitor-net`\n\n) had their IPs concatenated (e.g., `172.17.0.2172.19.0.7`\n\n). Antigravity traced the container IP extraction logic, proposed a fix, and validated the parser.Observability is built-in. By running `gbnt monitor init`\n\n, the Manager spins up a complete telemetry stack connected via a dedicated network `gbnt-monitor-net`\n\n:\n\nGubernator proves that you don't need a heavy orchestrator like Kubernetes to manage multi-host Docker deployments. By combining Go, SQLite, CoreDNS, and Caddy, we created a lightning-fast, decentralized orchestrator.\n\nPair-programming with an agentic coder like Antigravity allowed me to focus on high-level architecture while the AI handled refactoring, cross-compilation, VM deployment, and frontend updates.\n\nIf you are interested in building lightweight orchestration systems, check out the [Gubernator repository](https://github.com/mario-ezquerro/gubernator) and start building!\n\n*Have you built or used lightweight orchestrators? Let me know in the comments below!*\n\n`#devops`\n\n`#docker`\n\n`#golang`\n\n`#ai`\n\n`#pairprogramming`\n\n`#antigravity`", "url": "https://wpnews.pro/news/building-a-hybrid-docker-orchestrator-in-go-the-journey-from-single-vm-to-multi", "canonical_source": "https://dev.to/gde/building-a-hybrid-docker-orchestrator-in-go-the-journey-from-single-vm-to-multi-node-cluster-3i7m", "published_at": "2026-07-14 17:54:10+00:00", "updated_at": "2026-07-14 18:29:43.820619+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "ai-tools"], "entities": ["Gubernator", "Docker", "HashiCorp Nomad", "Antigravity", "Google DeepMind", "CoreDNS", "Caddy", "Mario Ezquerro"], "alternates": {"html": "https://wpnews.pro/news/building-a-hybrid-docker-orchestrator-in-go-the-journey-from-single-vm-to-multi", "markdown": "https://wpnews.pro/news/building-a-hybrid-docker-orchestrator-in-go-the-journey-from-single-vm-to-multi.md", "text": "https://wpnews.pro/news/building-a-hybrid-docker-orchestrator-in-go-the-journey-from-single-vm-to-multi.txt", "jsonld": "https://wpnews.pro/news/building-a-hybrid-docker-orchestrator-in-go-the-journey-from-single-vm-to-multi.jsonld"}}