Skip to content

Dump all Kubernetes resources into a directory structure

License

Notifications You must be signed in to change notification settings

guettli/dumpall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dump all Kubernetes resources into a directory structure

Dumps all Kubernetes resources into a directory structure:

out/NAMESPACE/GVK/NAME.yaml

For example:

out/kube-system/v1.ConfigMap/kubelet-config.yaml

The resources of kind Secret are not dumped by default. If needed, use --dump-secrets.

Via go run

The easiest way is to run the code like this:

go run github.com/guettli/dumpall@latest

Written: out/cert-manager/v1.Service/cert-manager.yaml
Written: out/cert-manager/v1.Service/cert-manager-webhook.yaml
Written: out/default/v1.Service/kubernetes.yaml
Written: out/_cluster/v1.Namespace/cert-manager.yaml    <-- non-namespaces resources use the directory "_cluster"
...

See Changes

After running dumpall you can modify your cluster, or just wait some time.

Then you can compare the changes with your favorite diff tool. I like Meld:

mv out out-1

go run github.com/guettli/dumpall@latest

meld out-1 out

Related

Feedback is welcome

Please create an issue if you have a question or a feature request.

About

Dump all Kubernetes resources into a directory structure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages