Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kubectl diff on windows returns an error: executable file not found in PATH

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"}
like image 314
Dennis Meissel Avatar asked Oct 15 '19 08:10

Dennis Meissel


People also ask

Can not find kubectl executable in path windows?

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.

How does kubectl DIFF Work?

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.


1 Answers

After installing DiffUtils for Windows on my local machine and restarting the machine everything works.

like image 168
Dennis Meissel Avatar answered Oct 04 '22 02:10

Dennis Meissel