How to delete a node label by command and api?

后端 未结 11 2296
被撕碎了的回忆
被撕碎了的回忆 2021-02-01 00:31

Add label to nodes:

$ kubectl label nodes 10.xx.xx.xx key1=val1 

If I want to delete label(key1=val1) on node(10.xx.xx.xx), how

11条回答
  •  灰色年华
    2021-02-01 01:00

    Below command worked for me to remove label:

    kubectl label node  

    Note: The syntax is a minus sign directly after the key. For example, if the node name is worker1 and the label is system=workernode, you can remove a label with the following command.

    kubectl label node worker1 system-
    

提交回复
热议问题