Skip to content

Deploy with a Go backend

Go services usually ship as a single static binary in a scratch or distroless image — and the sidecar follows the same philosophy: it’s a static binary too, running as its own container or process. There is nothing to embed in your Go binary and no SDK to import; your application code doesn’t change.

This guide assumes you have a config bundle or a hand-written sidecar.yaml + token.

compose.yaml
services:
app:
image: acme/acme-api:latest # e.g. FROM scratch, your Go binary
ports:
- "8080:8080"
ringzero-sidecar:
image: ghcr.io/ringzero/sidecar:1
restart: unless-stopped
ports:
- "7301:7301" # challenge listener — reachable at every (re)registration
volumes:
- ./ringzero-sidecar-config:/etc/ringzero:ro

The per-pod sidecar (when each pod has its own reachable address):

deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: acme-api
spec:
replicas: 1
selector:
matchLabels: { app: acme-api }
template:
metadata:
labels: { app: acme-api }
spec:
initContainers:
- name: ringzero-sidecar
image: ghcr.io/ringzero/sidecar:1
restartPolicy: Always # native sidecar (K8s 1.29+)
ports:
- containerPort: 7301
volumeMounts:
- name: ringzero-config
mountPath: /etc/ringzero
readOnly: true
resources:
requests: { cpu: 10m, memory: 16Mi }
limits: { memory: 64Mi }
containers:
- name: app
image: acme/acme-api:latest
ports:
- containerPort: 8080
volumes:
- name: ringzero-config
secret:
secretName: ringzero-sidecar

Create the Secret from your bundle as shown in Automated setup.

Go shops deploying a bare binary to VMs run the sidecar the same way — two units side by side. The download steps, checksum verification, and systemd unit are stack-independent; one sidecar per host covers every service on that host.

Sidecar logs show host registered; Settings → Hosts lists the host as active (see the host lifecycle); the health probe reports "registered": true. Troubleshooting: manual setup.