F5SPKStaticRoute¶
Note
Deprecated as of 2.4.0. Use an Infra resource instead.
Overview¶
Function¶
Declares a static route for a CNE instance, defining the destination, gateway, and interface used to route traffic.
Names¶
Singular name |
Plural name |
Short name |
|---|---|---|
f5-spk-staticroute |
f5-spk-staticroutes |
— |
API group and version¶
k8s.f5net.com/v1
Scope¶
Namespace
Specification¶
spec¶
Field |
Required |
Default |
Description |
|---|---|---|---|
|
No |
|
IPv4 address used for routing to the destination. Maximum length is 15 characters. When |
|
No |
|
IPv6 address used for routing to the destination. Maximum length is 39 characters. When |
|
No |
|
Specifies whether this is a dynamic route. When |
|
No |
|
Prefix length for the configured destination IPv4 address. Accepted values: 0 to 32. |
|
No |
|
Prefix length for the configured destination IPv6 address. Accepted values: 0 to 128. |
|
No |
|
Type of route to set, for example |
|
No |
|
IPv4 destination gateway address for routing the traffic. Maximum length is 32 characters. |
|
No |
|
IPv6 destination gateway address for routing the traffic. Maximum length is 39 characters. |
|
No |
|
Network interface responsible for receiving the incoming traffic. Maximum length is 255 characters. |
|
No |
|
Name of the VRF (tenant) this static route belongs to. When you don’t set this, the route is created in the default route domain. This field is immutable after creation. Maximum length is 255 characters. |
Example manifest¶
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
Deployment¶
Use the following steps to deploy the example F5SPKStaticRoute CR, and verify the BIG-IP Next for Kubernetes TMM configuration.
Copy the Example Manifest 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
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
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