我使用Windows,我刚刚下载了kubectl,使用下面的链接:https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/
但是当我查看版本时,我看到了一个警告:
C:\>kubectl version
WARNING: This version information is deprecated and will be replaced
with the output from kubectl version --short.
Use --output=yaml|json to get the full version.
Client Version: version.Info{
Major:"1",
Minor:"24",
GitVersion:"v1.24.0",
GitCommit:"4ce5a8954017644c5420bae81d72b09b735c21f0",
GitTreeState:"clean",
BuildDate:"2022-05-03T13:46:05Z",
GoVersion:"go1.18.1",
Compiler:"gc", Platform:"windows/amd64"
}
Kustomize Version: v4.5.4
Server Version: version.Info{
Major:"1",
Minor:"20",
GitVersion:"v1.20.7",
GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2",
GitTreeState:"clean",
BuildDate:"2021-05-12T12:32:49Z",
GoVersion:"go1.15.12",
Compiler:"gc",
Platform:"linux/amd64"
}
WARNING: version difference between client (1.24) and server (1.20)
exceeds the supported minor version skew of +/-1server版本是什么?~/.kube/config文件有关?H 212F 213发布于 2022-06-26 10:06:46
服务器版本是Kubernetes的版本,控制平面正在运行。
客户端版本是kubectl的版本。
建议您尽可能地将两者保持紧密,以防止API版本之间的差异。
例如,如果您使用1.24.0kubectl执行kubectl create --dry-run=client,它将产生对1.24.0Kubernetes有效的输出,但是它所引用的apis可能不会被1.20.7集群所识别。
您的服务器为1.20.7,客户端为1.24.0。要删除此错误,您需要在与此服务器交互时将kubectl降至1.20.7。或者将集群升级到1.24.0
https://stackoverflow.com/questions/72760471
复制相似问题