Is there a way to run kubectl diff -f .
in that way so that output shows only file names that would be changed with kubectl apply -f .
and not every single diff line...?
CodePudding user response:
You can use, something as below, here KUBECTL_EXTERNAL_DIFF
is an env variable, to use a custom diff
program with custom flags. So, basically, here we are telling kubectl
to use diff -qr
for displaying the difference. By default, kubectl use diff -u -N
.
KUBECTL_EXTERNAL_DIFF='diff -qr' kubectl diff -f .