Backup a Kubernetes cluster as yaml manifests
100K+
Git project: WoozyMasta/kube-dump
License: MIT
kube-dump is a utility for preserving the actual state of a Kubernetes environment when it needs to be captured.
In a test namespace, developer sandbox, temporary staging environment, or demonstration environment, state is often changed manually. Someone updates a Deployment, creates a ConfigMap, tries a new operator, writes data to a PVC, or runs a temporary image. That state may be needed again later, even if the environment has already changed or been deleted.
These environments do not always have GitOps, a separate backup system, or a strict lifecycle. That is fine, but important state can still be left without a portable copy.
kube-dump preserves this state in a readable format that can be stored locally, in Git, or in S3-compatible storage and used for recovery.
Ready-to-use files for the latest stable release:
| OS / architecture | Linux | macOS | Windows |
|---|---|---|---|
| amd64 | Linux amd64 | macOS amd64 | Windows amd64 |
| arm64 | Linux arm64 | macOS arm64 | Windows arm64 |
All published versions are available on GitHub Releases.
With Go 1.27 or newer, install the current version with:
go install github.com/woozymasta/kube-dump/v2/cmd/[email protected]
For running inside Kubernetes, use the ready-made Kustomize components.
The container image is published to:
ghcr.io/woozymasta/kube-dump:2.0.0-rc.1
docker.io/woozymasta/kube-dump:2.0.0-rc.1
For CI, debugging, and scripting, use the image with a shell and additional utilities:
ghcr.io/woozymasta/kube-dump:2.0.0-rc.1-debug
docker.io/woozymasta/kube-dump:2.0.0-rc.1-debug
More installation options are described in the documentation.
kube-dump preserves three independent parts of Kubernetes state:
Each layer can be saved separately or together with the others.
Each data type has its own command. For example, save resources locally:
kube-dump resource save dir ./backup
Or send them to S3-compatible storage:
kube-dump resource save s3 --s3-uri s3://backup/my-cluster/
Save PVC data and container images with the pvc and image commands.
Capture the state before maintenance or an experiment, before cleaning a temporary registry, or before deleting a test environment.
kube-dump does not replace Argo CD, Flux, Velero, database operators, or an application's own backup mechanisms.
If an application can create a correct logical database backup, continue to use that mechanism. If infrastructure is fully declared in Git, Git remains the source of desired state.
kube-dump captures what actually exists in the cluster at a given moment in a readable and portable form, so it can be used as a basis for recovery.
Profiles define how resources, PVCs, and images are selected and processed. For Kubernetes manifests, they also define cleanup rules and fields to encrypt.
Built-in profiles:
Sensitive YAML values can be encrypted with age or deterministic AES-256-SIV. Resource and PVC archives can additionally be protected with age.
This README is not the complete documentation. Installation, commands, profiles, encryption, PVCs, and images are covered in the documentation.
Content type
Image
Digest
Size
32.3 MB
Last updated
over 4 years ago
docker pull woozymasta/kube-dump