Labeling Nodes

Your kubernetes administrator will perform this task. They can label a single node or a group of nodes (node pool) with a specific designation with a key/value pair. This is needed to use affinity/anti-affinity capabilities with kubernetes.

To label a node the following command is used:
kubectl label nodes <nodename> key=value –overwrite 

The key/value pair that is defined here is arbitrary. It is a key/value pair that would then be used with helm chart parameter overrides to specify the affinity/anti-affinity.

Example with an arbitrary key/value pair of type=database looks like this:
kubectl label nodes gke-worker4 type=database –overwrite