使用kubectl查找有关Kubernetes master的详细信息的命令是什么? [英] What is command to find detailed information about Kubernetes master(s) using kubectl?

查看:113
本文介绍了使用kubectl查找有关Kubernetes master的详细信息的命令是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我说我想找到我的k8s master的kubelet和apiserver版本,最好的方法是什么?

Let say I want to find the kubelet and apiserver version of my k8s master(s), what's the best way to do it?

我知道以下命令:

kubectl cluster-info

仅显示端点.

kubectl get nodes; kubectl describe node <node>;

显示非常详细的信息,但仅显示节点而不显示主节点.

which shows very detail information but only the nodes and not master.

还有

kubectl version

但是仅显示kubectl版本,而不显示kubelet或apiserver版本.

but that only shows the kubectl version and not the kubelet or apiserver version.

我还可以使用哪些其他命令来识别集群的属性?

What other commands can I use to identify the properties of my cluster?

推荐答案

kubectl version也显示apiserver版本.例如,这是我运行它时的输出:

kubectl version also shows the apiserver version. For example, this is the output when I run it:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"3eed1e3be6848b877ff80a93da3785d9034d0a4f", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"3eed1e3be6848b877ff80a93da3785d9034d0a4f", GitTreeState:"clean"}

第二行(服务器版本")包含apiserver版本.如果没有将主节点的kubelet版本注册为节点之一,则无法获得它的版本(如果未在kubectl get nodes中显示,则不是这样),但是在大多数部署中,它将是与apiserver的版本相同.

The second line ("Server Version") contains the apiserver version. There isn't a way to get the master's kubelet version if it isn't registered as one of the nodes (which it isn't if it isn't showing up in kubectl get nodes), but in most deployments it'll be the same version as the apiserver.

这篇关于使用kubectl查找有关Kubernetes master的详细信息的命令是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆