Using Node Labels¶
Kubernetes labels enable you to manage cluster node workloads by scheduling Pods on specific sets of nodes. To ensure the Service Proxy Traffic Management Microkernel (TMM) Pods operate at optimal performance, apply a unique label to cluster nodes with high resource availability, and use the
nodeSelector parameter to select that set of nodes when installing the Ingress Controller.
This document guides you through applying a label to a set of cluster nodes, and using the
nodeSelector parameter to select the nodes.
In this procedure, a unique label is applied to three cluster nodes, and the
nodeSelector parameter is added to the Ingress Controller Helm values file.
Label cluster nodes:
oc label nodes <node-1> <node-2> <node-3> <label>
In this example, the cluster nodes are labeled cnf=tmm:
oc label nodes worker-1 worker-2 worker-3 cnf=tmm
View the labeled nodes:
oc get nodes -l <label>
In this example, the nodes worker-1, worker-2, and worker-3 are list using the label cnf=tmm:
oc get nodes -l cnf=tmm
NAME STATUS ROLES AGE VERSION worker-1 Ready <none> 89d v1.20.4 worker-2 Ready <none> 89d v1.20.4 worker-3 Ready <none> 89d v1.20.4
nodeSelectorparameter to the Ingress Controller Helm values file:
Note: Kubernetes labels are actually Key/Value pairs.
tmm: nodeSelector: key: "value"
In this example, the
nodeSelectoris configured to select the label cnf: “tmm”:
tmm: nodeSelector: cnf: "tmm"
You can now deploy the Ingress Controller to the designated cluster nodes.
Verify the Service Proxy TMM has installed to the proper node:
oc get get pods -n <project> -o wide
In this example, the TMM Pod is in the cnf-gateway namespace, and has installed to proper cluster node:
oc get pods -n cnf-gateway -o wide
NAME READY STATUS IP NODE f5-ingress-f5ingress-59cfd4dcdd-nwwpj 2/2 Running 10.244.3.110 worker-1 f5-tmm-7676db577f-725lx 5/5 Running 10.244.2.132 worker-2
Provide feedback to improve this document by emailing firstname.lastname@example.org.