Associating Pods to the Nodes
This section describes how to associate a pod to the node based on their labels.
After you have configured a cluster, you can associate pods to the nodes through labels. This association enables the pods to get deployed on the appropriate node based on the key-value pair.
Labels are required for the pods to identify the nodes where they must get deployed and to run the services. For example, when you configure the protocol-layer label with the required key-value pair, the pods are deployed on the nodes that match the key-value pair.
To associate pods to the nodes through the labels, use the following sample configuration:
config
k8 label vm_group key label_key value label_value
end
NOTES:
-
k8 label vm_group key label_key value label_value : Configures the K8 node affinity label parameters.
-
vm_group : Specify the VM group. It must be one of the following:
-
cdl-layer
-
oam-layer
-
protocol-layer
-
service-layer
-
-
key label_key : Specify the label key. label_key must be a string.
-
value label_value : Specify the label value. label_value must be a string.
-
-
If you choose not to configure the labels, then SMF assumes the labels with the default key-value pair.