k8s labels 创建和删除
#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-