When I joined GoDaddy, among other duties, I was tasked with keeping their “Legacy” Kubernetes installation alive and running. The team that had built it were all gone, and I was fairly new to Kubernetes, so I had to tread lightly.
As a result, I found myself constantly wishing I could see what
about to do. I was shocked that
kubectl didn’t have a diff mode. In
retrospect, I probably should have just learned Go, and added a –diff switch
kubectl. But, I fell back on the tool I know, and I had just written
shyaml to get my rust chops up. It was just a general CLI manipulation tool
for YAML and JSON at the time. Adding the ability to intelligently diff
Kubernetes objects was pretty straight forward.
So I added a
kubediff command, which tries to show you the real effect a
kubectl apply command will have before you run it. It’s not perfect, but
it generally works.
And so, I give this tool to the world. I hope to make it even more general purpose, as time permits. But until then, please enjoy the code, and feel free to report issues and open PR’s. Also, join us on the Tools for Humans Slack if you want to chat about it.