F5SPKStaticRoute

The F5SPKStaticRoute Custom Resource (CR) configures the BIG-IP Next for Kubernetes Traffic Management Microkernel’s (TMM) static routing table. This overview discusses the F5SPKStaticRoute CR. For the full list of CRs, refer to the BIG-IP Next for Kubernetes CRs.

This document guides you through a basic static route CR deployment.

Parameters

The CR spec parameters used to configure the BIG-IP Next for Kubernetes TMM static routing table are:

Parameter

Description

Default value

destination
string

The IPv4 address used for routing to the destination. The maximum length of the sting is 15.

“”

prefixLen
integer

The prefix length for the configured destination IPv4 address. The minimum value is 0 and maximum is 32. Note: Set prefixLen to 0 when the destination is 0.0.0.0.

32

gateway
string

The IPv4 destination gateway address for routing the traffic. The maximum length of string is 32.

“”

destination_v6
string

The IPv6 Address used for routing to the destination. The maximum length of string is 39.

“”

prefixLen_v6
integer

The prefix length for the configured destination IPv6 address. The minimum value is 0 and maximum is 128. Note: Set prefixLen_v6 to 0 when the destination is ::.

120

gateway_v6
string

The IPv6 destination gateway address for routing the traffic. The maximum length of the sting is 39.

“”

type
string

The type of route to set. The maximum length of the sting is 255.

“gateway”

interface
string

The network interface responsible for receiving the incoming traffic. The maximum length of the sting is 255.

“”

dynamic
boolean

Indicates whether this is a dynamic route.

false

Example CR:

apiVersion: "k8s.f5net.com/v1"
kind: F5SPKStaticRoute
metadata:
  name: "staticroute-ipv4"
  namespace: spk-ingress
spec:
  destination: 10.10.1.100
  prefixLen: 32
  type: gateway
  gateway: 10.146.134.1

Requirements

Make sure you have:

  • Installed BNK (DPU)

Deployment

Use the following steps to deploy the example F5SPKStaticRoute CR, and verify the BIG-IP Next for Kubernetes TMM configuration.

  1. Copy the Example CR into a YAML file:

    apiVersion: "k8s.f5net.com/v1"
    kind: F5SPKStaticRoute
    metadata:
      name: "staticroute-ipv4"
      namespace: spk-ingress
    spec:
      destination: 10.10.1.100
      prefixLen: 32
      type: gateway
      gateway: 10.146.134.1
    
  2. Install the F5SPKStaticRoute CR:

    $ kubectl apply -f staticroute-ipv4.yaml -n f5-bnk # kind: F5SPKStaticRoute in f5-bnk
     f5spkstaticroute.k8s.f5net.com/staticroute-ipv4 created
    
  3. Verify the status of the installed CR:

    $ kubectl get f5-spk-staticroutes -n f5-bnk
    

    In this example, the CR has installed successfully. An installation failure may indicate an improper configuration. For example; no route to host.

    
    

NAME READY MESSAGE AGE staticroute-ipv4 True CR config sent to all grpc endpoints 15s


4. To verify the static route configuration, log in to the BIG-IP Next for Kubernetes TMM container and show the routing table:

_In this example, TMM is installed in the **spk-ingress** Project:_

```shell
kubectl exec -it deploy/f5-tmm -n f5-bnk -- bash
ip route

In this example, the gateway IP address is a remote host on TMM’s external VLAN:

default via 169.254.0.254 dev tmm
10.10.1.100 via 10.146.134.1 dev external
10.20.2.0/24 dev external proto kernel scope link src 10.146.134.2