How Unbind Works
What runs under the hood, for the curious.
You do not need any of this to use Unbind. It is here for when you want to know what is on your server, or when you are debugging the instance itself.
Unbind is a layer on top of Kubernetes. The UI talks about services, replicas and servers on purpose, so you never have to think in Kubernetes terms. Underneath, everything is a standard Kubernetes resource that you can inspect. See Cluster Access.
What a deployment does
- You push, or press Deploy. The Unbind API records a deployment and puts it in the build queue.
- A build runs. The code is built into an image with Railpack or your Dockerfile, using BuildKit.
- The image is pushed to the registry, by default one that runs inside your instance.
- The API describes the service as a custom resource: image, ports, domains, variables, volumes, health checks.
- The Unbind operator turns that into Kubernetes resources, and the new version starts next to the old one.
- Traffic switches once the new version is healthy. Certificates for new domains are requested from Let's Encrypt.
How Unbind's words map to Kubernetes
| In Unbind | Underneath |
|---|---|
| Server | Node |
| Team | Namespace. Roles are enforced here as well. |
| Project, Environment | Labels on everything inside |
| Service | A custom resource, turned into a Deployment, a Service and routes |
| Replica | Pod |
| Variables | Secret |
| Volume | PersistentVolumeClaim |
| Database | A resource managed by a database operator |
What is installed
Everything lives in the unbind-system namespace, except storage.
| Part | What does it |
|---|---|
| Kubernetes | k3s |
| Storage | Longhorn |
| Traffic and routing | Envoy Gateway. Older installs use ingress-nginx. |
| Certificates | cert-manager with Let's Encrypt |
| Builds | BuildKit and Railpack |
| Image storage | A Docker registry, unless you chose an external one |
| Logs | Loki with Alloy, kept 3 days by default |
| Metrics | VictoriaMetrics, kept 7 days by default |
| Unbind's own data | PostgreSQL and Redis |
| Installing Redis and MongoDB | Flux |
The Unbind UI and API are a single program in a single image. The operator is a second one.
Databases
Databases you create are run by operators that specialize in them: Zalando's operator for PostgreSQL, MOCO for MySQL, Altinity's operator for ClickHouse, and Helm charts for Redis and MongoDB. That is where backups and version handling come from.
Open source all the way down
Every part of this is open source, and so is Unbind, under the MIT license. The code is on GitHub.