Skip to content

k8s-borgBorgBackup for Kubernetes

One Helm chart backs up the nodes, the cluster datastore, databases, S3 buckets and shared file systems into Borg repositories, deduplicated and encrypted on the client.

# one release backs up the cluster
$ helm install my-borg \
    oci://ghcr.io/ioanalytica/charts/k8s-borg \
    --version 1.2.3 \
    -n k8s-borg --create-namespace \
    -f values.yaml

# the cluster's archives, from the console pod
$ kubectl -n k8s-borg exec \
    my-borg-k8s-borg-app-0 -- borg-list

How it fits together ​

Each node backs up into a repository of its own, and the cluster data into another; the console pod has the Borg tools at hand for inspection and restores. With Borg UI, the node and console pods run as managed agents of a Borg UI server, one the chart deploys or an existing one; the UI itself is Borg UI, documented at docs.borgui.com.

Quick start ​

The chart is published as an OCI artifact; the images live on GitHub Container Registry. A first install needs an SSH host with Borg and a directory there for the repositories (mycluster below, which Borg 1 does not create), a passphrase, an SSH key the host accepts and the host's known_hosts line. The chart names no paths to back up by default: give them as R roots, here each node's /etc:

sh
helm install my-borg oci://ghcr.io/ioanalytica/charts/k8s-borg \
  --version <version> -n k8s-borg --create-namespace \
  --set borg.repoBase.value="ssh://user@borg.example.com:22/./mycluster" \
  --set borg.passphrase.value="…" \
  --set-file ssh.privateKey=./id_ed25519 \
  --set-file ssh.knownHosts=./known_hosts \
  --set 'node.include={P fm,R /node/etc}'
ghcr.io/ioanalytica/k8s-borg:<tag>       # backup / agent / repository server image
ghcr.io/ioanalytica/k8s-borg-ui:<tag>    # Borg UI server image, built from the pinned borg-ui

For anything beyond a smoke test, keep the sensitive values in a pre-created Secret (existingSecret). The modes, the repository server, Borg 1 vs 2, the Borg UI options and every parameter are documented on the documentation site. A Flux HelmRelease with the Secrets it references is in examples/.

Distributed under the AGPL-3.0-only license.