Configure the Network¶
The F5SPKVlan Custom Resource (CR) facilitates the configuring the Self IP addresses for direct connection to the physical network. Furthermore, F5SPKVlan configures the Traffic Management Microkernel (TMM) network interface settings, including VLAN tags, Maximum Transmission Unit (MTU), bonding, packet hashing algorithms, and interfaces.
When network interfaces such as Scalable Functions (SFs) are connected to TMM via the Network Attachment Definition, these interfaces are assigned index numbers according to their configuration order. For example, interfaces are indexed as 1.1, 1.2, and so forth. In the external and internal F5SPKVlan configuration examples (see Apply internal and external F5SPKVlan CR), note that the interfaces section references 1.1 and 1.2.
Follow the below instructions to configure the network successfully:
Annotate Internal-facing interfaces¶
You must add an annotation to the Host node to establish static routes that direct traffic to the TMM pod on the DPU. The IP’s CIDR range must match the internal network’s CIDR range.
Verify the node annotation.
kubectl get nodes -o yaml | grep node-primary-ifaddr
Sample Output:
k8s.ovn.org/node-primary-ifaddr: '{"ipv4":"10.144.175.15/24","ipv6":"2620:128:e008:4018::15/128"}'
If the
node-primary-ifaddr
annotation has not been added already, use the following command to annotate the node:kubectl annotate node <host node name> k8s.ovn.org/node-primary-ifaddr='{"ipv4":"<IPv4 Address/subnet>","ipv6":"<IPv6 Address/subnet>"}'
Apply internal and external F5SPKVlan CR¶
Before you apply an F5SPKVlan, ensure that you have sufficient IPv4 and IPv6 addresses based on the number of TMM instances you have planned to configure. This ensures that each TMM replica is assigned a unique Self IP address.
Create a VLAN (
spk-ext-vlan.yaml
) using the example below to configure the external network.Important: Ensure that you modify the custom resource (CR) according to your BNK cluster configuration requirements.*
Example external VLAN CR:
apiVersion: "k8s.f5net.com/v1" kind: F5SPKVlan metadata: name: "external" namespace: alpha spec: name: external mtu: 8000 #tag: 203 interfaces: - "1.1" selfip_v4s: [11.19.1.80,11.19.1.81,11.19.1.82] prefixlen_v4: 16 selfip_v6s: ["bb11::19:1:80","bb11::19:1:81","bb11::19:1:82"] prefixlen_v6: 96
Create a VLAN (spk-int-vlan.yaml) using the example below to configure the internal network.
Important: Ensure that you modify the custom resource (CR) according to your BNK cluster configuration requirements.
Example internal VLAN CR:
apiVersion: "k8s.f5net.com/v1" kind: F5SPKVlan metadata: name: "internal" namespace: alpha spec: name: internal mtu: 8000 internal: true #tag: 1619 interfaces: - "1.2" selfip_v4s: [10.19.1.80,10.19.1.81,10.19.1.82] prefixlen_v4: 16 selfip_v6s: ["bb10::19:1:80","bb10::19:1:81","bb10::19:1:83"] prefixlen_v6: 96
Apply the VLANs that you have created.
kubectl apply -f spk-int-vlan.yaml
kubectl apply -f spk-ext-vlan.yaml
Verify the status of the installed CRs.
kubectl get f5-spk-vlan -n default
Sample Output:
NAME READY MESSAGE AGE external True CR config sent to all grpc endpoints 30h internal True CR config sent to all grpc endpoints 30h
To confirm the configuration of the Self IP address, access the TMM container for BIG-IP Next in Kubernetes.
In this example, TMM is installed in the default Project:
kubectl exec -it deploy/f5-tmm -n default -- bash
List the interfaces.
ip addr | grep -E 'internal|external'
Sample Output:
7: external: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 inet 192.168.10.100/24 brd 10.20.0.0 scope global external 8: internal: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 inet 10.144.175.100/24 brd 10.144.175.0 scope global internal