使用命令查看节点信息时候 ROLES 原来none
[root@master .kube]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
master Ready master 30m v1.10.0
node01 Ready 14m v1.10.0
node02 Ready 12m v1.10.0

添加标签
[root@master ~]# kubectl label node node01 node-role.kubernetes.io/node=node
[root@master ~]# kubectl label node node02 node-role.kubernetes.io/node=node
[root@master ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
master Ready master 40m v1.10.0
node01 Ready node 24m v1.10.0
node02 Ready node 22m v1.10.0

Logo

开源、云原生的融合云平台

更多推荐