$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
kmaster Ready master 5d22h v1.19.4
添加-o wide 后查看扩展信息
$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
kmaster Ready master 5d22h v1.19.4 192.168.2.131 <none> Ubuntu 16.04.4 LTS 4.4.0-197-generic docker://19.3.14
查看节点资源使用率
$ kubectl top nodes
NAME CPU(cores) CPU% MEMORY(bytes) MEMORY%
kmaster 163m 8% 1241Mi 42%
knode01 65m 6% 842Mi 44%
查看集群节点的标签信息
kubectl get node --show-labels
NAME STATUS ROLES AGE VERSION LABELS
kmaster Ready master 5d21h v1.19.4 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=kmaster,kubernetes.io/os=linux,node-role.kubernetes.io/master=