Add to
-
kubectl label nodes kube- node label_name=label_value
kubectl label nodes 1.1.1.1 label_name=label_value
Inquire
-
kubectl get node -a -l "node=kube-node"
Delete a Label, only the last specified on the command line and the name of the Label key can be connected with a minus sign:
$ kubectl Nodes label 1.1.1.1 role-
modify the value of a Label, --overwrite need to add parameters:
$ kubectl label nodes 1.1.1.1 role = apache --overwrite
Or you can directly kubectl edit can edit this node configuration, save and exit on it!