Skip to content

Instantly share code, notes, and snippets.

@djosix
Created August 5, 2024 12:41
Show Gist options
  • Save djosix/b12cc2ef57e99a14073e76f92870331a to your computer and use it in GitHub Desktop.
Save djosix/b12cc2ef57e99a14073e76f92870331a to your computer and use it in GitHub Desktop.

kubectl pretty diff

  1. Install kubectl-neat-diff
d="$(mktemp -d)" && git clone https://github.com/djosix/kubectl-neat-diff "$d" && cd "$d" && make install && cd - && rm -r "$d"
  1. Install colordiff
sudo apt install colordiff
  1. Customize the diff command used by kubectl diff
DIFF='colordiff -uN' KUBECTL_EXTERNAL_DIFF=kubectl-neat-diff kubectl diff -f XXX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment