I've started leaning in on kubernetes kustomize to customize my manifests per deployment per environment. Today I learned that it comes with a diff command.


kubectl diff -k k8s/overlays/local

You can enable color diffs by using an external diff provider like colordiff.


export KUBECTL_EXTERNAL_DIFF="colordiff -N -u"

You might need to install colordiff if you don't already have it.


sudo pacman -S colordiff

sudo apt install colordiff

Now I can try out kustomize changes and see the change with kustomize diff.