kubectl version --short
会给你一个简短而甜美的k8集群版本
aathith@k8-master:~# kubectl version --short
Client Version: v1.18.1
Server Version: v1.18.1
编辑1:
在终端1
aathith@k8-master:~# kubectl proxy
Starting to serve on 127.0.0.1:8001
在2号航站楼
aathith@k8-master:~# curl http://localhost:8001/version -k
{
"major": "1",
"minor": "18",
"gitVersion": "v1.18.1",
"gitCommit": "e0fccafd69541e3750d460ba0f9743b90336f24f",
"gitTreeState": "clean",
"buildDate": "2020-04-16T11:35:47Z",
"goVersion": "go1.13.9",
"compiler": "gc",
"platform": "linux/amd64"
}
kubectl get cs/componentstatuses
,其中列出了控制器管理器和调度程序,但是它不显示版本kubectl describe cs
且未实现。