Accessing Network Attachment Definitions

Connect network attachment definitions (NADs) to SBA Gateway with Kubernetes annotations.

The following MATRIXX Helm values file excerpt shows linking of the vlan-conf-1 and vlan-conf-2 NADs to the sba-5gc-chf pod, using the global.annotations.podAnnotations.matching property:

global:
  # Features
  features:
    # Turn on SBA
    sba5gc: true
  annotations:
    podAnnotations:
      - matching: ["sba-5gc-chf"]
        values:
          k8s.v1.cni.cncf.io/networks: '[
            {"name" : "vlan-conf-1","interface": "eth1"},
            {"name" : "vlan-conf-2","interface": "eth2"}]'

For more information about the global.annotations.podAnnotations.matching property, see the discussion about annotation configuration in MATRIXX Configuration.

Once MATRIXX is updated with that configuration, view connections with the following command:

kubectl describe pods -n matrixx sba-5gc-chf

Lines in the output from the kubectl describe pods command that include multus are the NADs added for Multus and the IP address assigned:

Normal   AddedInterface  2m24s               multus             Add eth0 [10.1.112.13/32]
Normal   AddedInterface  2m24s               multus             Add eth1 [192.168.1.240/24] from vlan-conf-1
Normal   AddedInterface  2m24s               multus             Add eth2 [192.168.2.245/24] from vlan-conf-2