katafygio
Continuously backup Kubernetes objets as YAML files in git
About this chart
Katafygio
Katafygio discovers Kubernetes objects (deployments, services, ...), and continuously saves them as YAML files in a Git repository. This provides real-time, continuous backups, and keeps detailed changes history.
TL;DR;
$ helm install <helm-repo>/katafygio
$ helm install stable/katafygio
Introduction
This chart installs a Katafygio deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.9+
Chart Details
You may filter out irrelevant objects using the excludeKind and excludeObject options, to keep your backups' repository lean.
By default, the chart will dump (and version) the clusters content in /var/lib/katafygio/data (configurable with localDir).
This can be useful as is, to keep a local changes history. To benefit from long term, out of cluster, and centrally reachable persistence, you may provide the address of a remote Git repository (with gitUrl), where all changes will be pushed.
Installing the Chart
To install the chart with the release name my-release:
$ helm install --name my-release <helm-repo>/katafygio
$ helm install --name my-release stable/katafygio
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following table lists the configurable parameters of the Katafygio chart and their default values.
| Parameter | Description | Default |
|---|---|---|
replicaCount | Desired number of pods | 1 |
image.repository | Katafygio container image name | bpineau/katafygio |
image.tag | Katafygio container image tag | v0.7.1 |
image.pullPolicy | Katafygio container image pull policy | IfNotPresent |
localDir | Container's local path where Katafygio will dump and commit | /tmp/kf-dump |
gitUrl | Optional remote repository where changes will be pushed | nil |
noGit | Disable Git versioning | false |
filter | Label selector to dump only matched objects | nil |
healthcheckPort | The port Katafygio will listen for health checks requests | 8080 |
excludeKind | Object kinds to ignore | {"replicaset","endpoints","event"} |
excludeObject | Specific objects to ignore (eg. "configmap:default/foo") | nil |
rbac.create | Enable or disable RBAC roles and bindings | true |
serviceAccount.create | Whether a ServiceAccount should be created | true |
serviceAccount.name | Service account to be used | nil |
resyncInterval | Seconds between full catch-up resyncs. 0 to disable | 300 |
logLevel | Log verbosity (ie. info, warning, error) | warning |
logOutput | Logs destination (stdout, stderr or syslog) | stdout |
logServer | Syslog server address (eg. "rsyslog:514") | nil |
resources | CPU/Memory resource requests/limits | {} |
tolerations | List of node taints to tolerate | [] |
affinity | Node affinity for pod assignment | {} |
nodeSelector | Node labels for pod assignment | {} |
Specify each parameter using the --set key=value[,key=value] argument to helm install.
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
Specify each parameter using the --set key=value[,key=value] argument to helm install.
$ helm install --name my-release -f values.yaml <helm-repo>/katafygio
Tip: You can use the default values.yaml $ helm install --name my-release -f values.yaml stable/katafygio
Deploy katafygio with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has katafygio on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkatafygio is pinned at v0.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply