Associating Pods to the Nodes

This section describes how to associate a pod to the node.

After configuring a cluster, you can associate the 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 be 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.

  1. To associate pods to the nodes through the labels, use the following configuration:

    config 
     k8 
       label 
         cdl-layer   
           key key_value 
           value value 
         oam-layer   
           key key_value 
           value value 
         protocol-layer   
           key key_value 
           value value 
         service-layer   
           key key_value 
           value value 
           end 

NOTES:

  • If you don't configure the labels, cnSGW-C assumes the labels with the default key-value pair.

    • label { cdl-layer { key key_value | value value } —Configures the key value pair for CDL.

    • oam-layer { key key_value | value value } —Configures the key value pair for OAM layer.

    • protocol-layer { key key_value | value value } —Configures the key value pair for protocol layer.

    • service-layer { key key_value | value value } —Configures the key value pair for the service layer.