Cluster component
Zeabur Builder
Builds images from your Git repositories and keeps them in the cluster, so services can deploy from Git.
- Memory when idle
- about 50 MiB
- CI measures it once the app is ready and before any traffic. Leave room for more.
- Tested on
- x86 and ARM servers
- Installed by default
- Optional
Introduction
Zeabur Builder builds container images from Git repositories and uploaded folders, with a Dockerfile or Railpack. It keeps the images in zot, an OCI registry that the component installs with it, so builds need no external registry account. Zeabur OSS needs it to deploy services from Git. Without it, services deploy from images only.
Builder runs one buildkitd per namespace that builds. The component adds a CA through cert-manager for zot’s certificate. Pushes need a short-lived token that Builder signs. A NetworkPolicy lets only Builder, buildkitd and build pods reach zot. zot keeps the 20 most recent tags of each repository, and it stores images on a 20Gi volume.
Builder reads, creates, updates and deletes Secrets in every namespace (Git credentials and their copies), and manages Builds, BuildRuns and Jobs there. Each buildkitd is privileged and runs with a user namespace and an egress policy.
Before you install
- Install cert-manager first. It issues zot’s certificates.
- Nodes pull images from zot at the fixed address of the
clusterIpinput, a free address in the cluster’s Service CIDR. Zeabur picks one when you leave it empty. On K3s, RKE2 and KubeSolo, thezot-nodeDaemonSet points each node at that address and gives it the CA from thezot-tlsSecret. On other distributions, set up a registry mirror forzot.zot.svc:5000to that address on each node, and trust that CA.
Use it
In a Zeabur OSS project, select Add → Deploy from Git and enter the repository. See Build and deploy a service from Git. The page also covers uploading a folder. Keel deploys the finished image, so install it too.
Remove it
Removing Zeabur Builder stops all builds. The zot volume stays with every image in it, and so do the CRDs with every Build.
Check first that no service pulls its image from zot. A pod that restarts or moves to another node cannot pull it after zot is gone. See Remove components.
Troubleshooting
zot does not start
zot waits for the Secrets zot-tls and zot-token-signer. Run kubectl -n zot get certificate,pods. A Certificate that is not ready points to cert-manager.
A service cannot pull its image
Pods stay in ImagePullBackOff. Run kubectl describe pod <name> and read the event. On K3s, RKE2 and KubeSolo, check that a zot-node pod runs on that node and that /var/lib/rancher/k3s/agent/etc/containerd/certs.d/zot.zot.svc:5000/hosts.toml (RKE2: rancher/rke2, KubeSolo: /var/lib/kubesolo/containerd/registry/) names the clusterIp address.
Technical details
This release
- Provides
- builds
- Licence
- Apache-2.0
- Homepage
- github.com
Tested in CI
CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.
| Distribution | Platform | Kubernetes | Passed | Idle memory |
|---|---|---|---|---|
| k3s | linux/amd64 | v1.37.2 | 51 MiB | |
| k3s | linux/arm64 | v1.37.2 | 50 MiB | |
| kind | linux/amd64 | v1.37.0 | 51 MiB | |
| kind | linux/arm64 | v1.37.0 | 51 MiB | |
| kubesolo | linux/amd64 | v1.36.6 | 50 MiB | |
| kubesolo | linux/arm64 | v1.36.6 | 50 MiB | |
| rke2 | linux/amd64 | v1.37.2 | 51 MiB | |
| rke2 | linux/arm64 | v1.37.2 | 50 MiB |
Security
Zeabur Builder: a ClusterRole that manages Builds, BuildRuns and Jobs in every namespace; reads Pods, Namespaces and ServiceAccounts; reads, creates, updates and deletes Secrets in every namespace (the Git credentials Builds name, and the copies it puts in build namespaces), and reads the zot token signer. Runs one privileged buildkitd per building namespace in its own namespace, with a user namespace and an egress policy. An admission policy limits the Jobs and StatefulSets it can create. zot: no RBAC, a ServiceAccount without roles; serves the OCI registry API over TLS on port 5000 inside the cluster. zot-node: a DaemonSet that runs as root on every node, without capabilities, and writes zot's address and CA into the container runtime's registry directory under /var/lib.
What it installs
- tls
- zot 0.1.134
- builder 0.3.0
Needs
- any certificates component