[root@master ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
master Ready master 67d v1.18.1
node01 Ready <none> 67d v1.18.1
node02 Ready <none> 67d v1.18.1
[root@master ~]# kubectl get node —show-labels
NAME STATUS ROLES AGE VERSION LABELS
master Ready master 67d v1.18.1 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=master,kubernetes.io/os=linux,node-role.kubernetes.io/master=
node01 Ready
node02 Ready
[root@master ~]# kubectl label nodes node01 node-role.kubernetes.io/node=
node/node01 labeled
[root@master ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
master Ready master 67d v1.18.1
node01 Ready node 67d v1.18.1
node02 Ready
[root@master ~]# kubectl label nodes node02 node-role.kubernetes.io/node=
node/node02 labeled
[root@master ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
master Ready master 67d v1.18.1
node01 Ready node 67d v1.18.1
node02 Ready node 67d v1.18.1