Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1014 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 1014 Bytes

kube-compare

Take snapshots of your K8s cluster yaml and compare them later on

Using

To dump & compare all resources in the cluster:

./kubecompare dump -f 17-feb-2023-dump-all
./kubecompare compare -f 17-feb-2023-dump-all

To dump & compare specific types of resources:

./kubecompare dump -f 17-feb-2023-dump-pods-ss-ds -r "pods statefulset daemonset"
./kubecompare compare -f 17-feb-2023-dump-pods-ss-ds

For nicer output, dyff can be used.

dyff image

Once dyff is installed run the following command to use it instead of the default kubectl diff:

export KUBECTL_EXTERNAL_DIFF="dyff between --omit-header --set-exit-code"

Updating

Shell script generated using Bashly yaml file contained in the src folder. Run bashly generate to update the shell scripts when the bashly.yml file is updated.