我使用 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 /-1
- 我應該擔心嗎?
- 如果是這樣,我該如何解決?
- 什么是
server版本? ~/.kube/config它與檔案有某種關系嗎?
uj5u.com熱心網友回復:
服務器版本是控制平面運行的 Kubernetes 版本。
客戶端版本,如果您的kubectl.
建議您使兩者盡可能接近,以防止 API 版本之間出現差異。
例如,如果您kubectl create --dry-run=client使用 1.24.0 kubectl 執行操作,它將產生對 1.24.0 kubernetes 有效的輸出,但它參考的 api 可能無法被 1.20.7 集群識別。
你的服務器是 1.20.7,你的客戶端是 1.24.0。要消除此錯誤,您需要在與此服務器互動時將 kubectl 降級到 1.20.7。或將您的集群升級到 1.24.0
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/497061.html
標籤:视窗 Kubernetes kubectl
