I have a problem using Kubectl on Windows:
C:\> kubectl diff -f app.yml
error: executable file not found in %PATH%
Kubernetes is installed with the Docker Desktop. The same error comes independent of the file, I'm using as an argument (even if the .yml file doesn't contain anything).
Version:
C:\> kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:36:53Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.6", GitCommit:"96fac5cd13a5dc064f7d9f4f23030a6aeface6cc", GitTreeState:"clean", BuildDate:"2019-08-19T11:05:16Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Once you're sure that kubectl is installed, then add C:\Program Files (x86) to your PATH and you should be good. If you're on Windows 10, you can do that by going to Command Prompt, search for System, click into System. Then on the right left hand side click on Advanced System Settings, you'll get a popup window.
kubectl diff does exactly what you want by showing the differences between the current "live" object and the new "dry-run" object. It makes it very convenient to focus on only the changes that are made to the object, how the server has merged these and how the mutating webhooks affects the output.
After installing DiffUtils for Windows on my local machine and restarting the machine everything works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With