#1 lables
# node label
[root@master01 pod]# kubectl label pods pod-self time=2023
[root@master01 pod]# kubectl get node --show-labels
[root@master01 pod]# kubectl label nodes node01 host-
#2 pod label
[root@master01 pod]# kubectl label nodes node01 host=01
[root@master01 pod]# kubectl get pod --show-labels
[root@master01 pod]# kubectl get pod -l dev -o wide
[root@master01 pod]# kubectl label nodes node01 host-
标签:kubectl,master01,删除,labels,label,pod,k8s,root From: https://www.cnblogs.com/liuyoushui/p/17254546.html