gst*_*low 2 windows kubernetes kubectl
我使用 Windows,并且刚刚使用此说明中的链接下载了 kubectl:在 Windows 上安装和设置 kubectl
但是当我检查版本时,我看到一个警告:
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 +/-1
Run Code Online (Sandbox Code Playgroud)
server?~/.kube/config文件有某种关系吗?服务器版本是控制平面运行的 Kubernetes 版本。
客户端版本是你的kubectl.
建议您使两者尽可能接近,以防止 API 版本之间出现差异。
例如,如果您kubectl create --dry-run=client使用 1.24.0 kubectl 执行 a,它将生成对 1.24.0 kubernetes 有效的输出,但它引用的 api 可能无法被 1.20.7 集群识别。
您的服务器是1.20.7,您的客户端是1.24.0。要消除此错误,您需要在与此服务器交互时将 kubectl 降级到 1.20.7。或者将集群升级到 1.24.0
| 归档时间: |
|
| 查看次数: |
9617 次 |
| 最近记录: |