kubedump is a tool for dumping manifests from your Kubernetes clusters. It’s highly inspired by the available shell scripts (1, 2) and just a Go implementation with similar behaviour I wrote mostly for fun.
A clear drawback of the Go implementation is the enormous binary size for such small functionality. Currently, the code is not even 200 lines of code but due to the imports from the Kubernetes ecosystem, the binary is around 30 MB. Nevertheless, having a binary instead of a shell script might have other benefits, e.g. no other required dependencies and compared to the scripts it seems to be very fast.
Make sure to check the repository for the latest version.
»
Installation
»
Precompiled Binaries
Binaries are available for all major platforms. See the releases page.
»
Homebrew
Using the Homebrew package manager for macOS:
1
| brew install sj14/tap/kubedump
|
»
Manually
It’s also possible to install via go get
:
1
| go get -u github.com/sj14/kubedump
|
»
Usage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| Usage of kubedump:
-clusterscoped
dump cluster-wide resources (default true)
-config string
path to the kubeconfig (default "~/.kube/config")
-context string
context from the kubeconfig, empty for default
-dir string
output directory for the dumps (default "dump")
-ignore-namespaces string
namespace to ignore (e.g. 'ns1,ns2')
-ignore-resources string
resource to ignore (e.g. 'configmaps,secrets')
-namespaced
dump namespaced resources (default true)
-namespaces string
namespace to dump (e.g. 'ns1,ns2'), empty for all
-resources string
resource to dump (e.g. 'configmaps,secrets'), empty for all
-stateless
remove fields containing a state of the resource (default true)
-threads uint
maximum number of threads (minimum 1) (default 10)
-verbose
output the current progress
-version
print version information of this release
|