Show HN: Have kubectl diff use your custom YAML cleaning and comparison logic

1 kwentine 0 8/9/2025, 5:02:19 PM github.com ↗
Hi HN, Meet `kdiff` a modest Bash wrapper around `kubectl diff` that allows to conveniently specify cleaning and comparison logic.

One example (many more in the README):

# Arguments after -- are passed to kubectl # Limit the diff to the resource spec, and use dyff kdiff --yq='.spec ' --compare 'dyff between -b' -- -f mypod.yaml

Comes with a "preset" configuration system, that allows to save executables in ~/.config/kdiff and then:

    kdiff --preset clean:dyff -- -f mypod.yaml
I hope the Bash code is readable, a lot of pen-and-papering and thinking during bike rides went into it... after a sobering first vibe-coding attempt that utterly failed.

Cheers HN, thanks for the endless source of inspiration (and distraction ^^)!

Comments (0)

No comments yet