docs/doc/source/node_management/kubernetes/configuring_node_labels/removing-node-labels-from-the-cli.rst
Ngairangbam Mili 71dd4cc4b1 Fixed procedural steps
Change-Id: I2b6a4ddf992dab5810883ac991e87160f8f8388d
Signed-off-by: Ngairangbam Mili <ngairangbam.mili@windriver.com>
2024-11-27 05:14:38 +00:00

1.6 KiB

Remove Node Labels from the CLI

You can remove labels to affect the scheduling of Kubernetes objects, such as pods.

Hosts must be locked before labels can be removed.

Labels are key/value pairs that are attached to nodes and are used to specify identifying attributes of nodes. Labels can be used to identify physical attributes of a node such as special purpose hardware or labels can be used to identify logical attributes of a node, for example the role of a node.

To change the value of a label, you must remove and reapply it. For more information, see Assign Node Labels from the CLI <assigning-node-labels-from-the-cli>.

For more information on labels that are used to assign pods to nodes, refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/.

To remove a label from a host, use the host-label-remove command.

One or more labels can be removed.

The command format is:

system host-label-remove (<hostName> | <hostID>) <key> [<key> ...]

For example:

~(keystone)admin)$ system host-label-remove worker-0 openstack-compute-node openvswitch sriov
Deleted host label openstack-compute-node for host worker-0
Deleted host label openvswitch for host worker-0
Deleted host label SRIOV for host worker-0