Mapping Pods with Node Labels

Prerequisites

  • Ensure that the node labels are according to the pod deployment layout.

  • Ensure that the external VIPs are according to the requirement of NF.

  • Enable Istio for pod to pod traffic load balancing.

Node Labels are key and value pairs that are attached to nodes at cluster synchronization. Each node can have a set of key and value labels defined. Each key must be unique for a node. With labels, users can map their NF pods onto nodes in a loosely coupled manner.

Important
  • The pod-level labeling configuration is applicable only when the cnSGW-C is deployed on a bare metal server.

  • Ensure to configure the node label on the SMI cluster deployer before mapping the pods. Following is the sample command for master-1 labeling:

    [cndp-clpnc-cm-cm-primary] SMI Cluster Deployer (config-nodes-master-1)# k8s node-labels smi.cisco.com/svc-type smf-node

To map the pods with node labels, use the following sample configuration:

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

Following is an example configuration of pod to node-label mapping:

k8 label protocol-layer key smi.cisco.com/node-type value smf-proto
exit
k8 label service-layer key vm-type value smf-svc
exit
k8 label cdl-layer key smi.cisco.com/node-type value smf-cdl
exit
k8 label oam-layer key smi.cisco.com/node-type value oam
exit