我在使用Windows的Kubectl时遇到了问题:
C:\> kubectl diff -f app.yml
error: executable file not found in %PATH%
Kubernetes是与Docker Desktop一起安装的。无论使用哪个文件作为参数(即使.yml文件不包含任何内容),都会出现相同的错误。
版本:
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"}
kubectl
的系统PATH环境变量是否正确设置在高级系统设置 -> 高级 -> 环境变量 -> Path
中? - Wytrzymały Wiktor