BNKGateway¶
BNKGateway custom resource¶
The BNKGateway CR allows you to define the CIDR range for dual-stack, IPv4, or an IPv6 address. The CIDR block specified in the BNKGateway CR is used to allocate IP address for the service.
Note
Using BNKGateway in BIG-IP for Kubernetes is optional.
Use the following names when you reference this resource:
Plural: f5-bnkgateways
Singular: f5-bnkgateway
Use cases¶
This section lists how the application behaves when BNKGateway is applied and not applied.
BNKGateway is applied
When BNKGateway CR is applied,
F5 IPAM controller allocates the IP address in the IPAM CR, and the gateway resource is updated with the allocated IP address and relevant status.
The static IP address specified in the gateway resource is validated based on the CIDR range specified in the BNKGateway CR.
BNKGateway is not applied
When BNKGateway is not applied,
The gateway resource is not updated with the IP address and relevant status.
F5 IPAM controller does not validate the static IP address specified in the gateway resource.
For more details on Gateway CR and how to use, see Gateway.
Sample BNKGateway CR¶
This example CR defines the CIDR range, start address, and end address for each listener network (IPv4 and IPv6). The defined values are applied to the IPAM CR to enable the FIC to allocate IP address.
apiVersion: k8s.f5net.com/v1
kind: F5BnkGateway
metadata:
name: my-gateway
namespace: f5-bnk
spec:
ingressConfig:
defaultListenerNetworks:
- name: default_ipv4
ipv4BaseCidr: 22.22.22.100/24
startAddress: 22.22.22.160
endAddress: 22.22.22.170
- name: default_ipv6
ipv6BaseCidr: 2002::22:22:22:100/112
startAddress: 2002::22:22:22:161
endAddress: 2002::22:22:22:170
BNKGateway CRD Parameters¶
This section provides the list of parameters and the related attributes of the BNKGateway. You must deploy BNKGateway within a Kubernetes namespace to manage the IP addresses using the F5 IPAM controller.
The table below includes the parameter name, description, and default value of the parameters available in the spec section of BNKGateway.
Parameter |
Description |
|---|---|
|
Specifies that the configuration is for ingress traffic. |
|
Specifies the list of default listener networks. |
|
Specifies name or label for identifying the IP Block. |
|
Specifies the base CIDR for IPv4 addresses. |
|
Specifies the base CIDR for IPv6 addresses. |
|
Specifies the starting address of the network range. The value can be for either IPv4 or IPv6. |
|
Specifies the last address of the network range. The value can be for either IPv4 or IPv6. |
Configure BNKGateway¶
Prerequisites¶
Make sure,
The product BNK (DPU) is installed and the F5 controller is running.
The F5SPKVlan CR is configured.
Create BNKGateway CR¶
To create the BNKGateway CR in the namespace with CIDR range,
Copy the above sample code to a yaml file. For eg:<test-bnkgateway>.yaml
Modify and save the yaml file.
Verify if the CNE controller is installed in the namespace.
Apply the BNKGateway CR in the same namespace where the CNE controller is installed.
Use the below command to appy the CR.
$ kubectl apply -f <test-bnkgateway>.yaml -n <namespace-name>
Example
$ kubectl apply -f bnkgateway.yaml -n f5-bnk
f5bnkgateway.k8s.f5net.com/my-gateway created
Note
Make sure the BNKGateway custom resource shares the same name and namespace as the Gateway resource for which IPAM services are provided.
Make sure each listener network item specify either
ipv4BaseCidroripv6BaseCidr, but not both. For dual‑stack configurations, create separate items: one for IPv4 and one for IPv6.
Verify BNKGateway CR¶
Use the below command to very if the BNKNetpolicy CR status.
$ kubectl get f5-bnkgateways -n <namespace>
Example
$ kubectl get f5-bnkgateways -n f5-bnk
NAME READY MESSAGE AGE
my-gateway True CR config sent to all grpc endpoints 25s
Editing BNKGateway CR¶
This section provides the details to edit the BNKGateway CR. You can perform the following actions,
You must recreate the file to edit the CIDR range of the listener network. See Modify the CIDR range
You can only increase the IP pool size by editing the start and end IP addresses for the defined CIDR range. See Modify the IP addresses
Modify the CIDR range¶
To modify the CIDR range of the configured network,
Delete the existing BNKGateway CR (for example, test-bnkgateway.yaml) file from the namespace.
Create a new BNKGateway CR file with the modified IPv4 or IPv6 CIDR ranges using these parameters:
ingressConfig.defaultListenerNetworks.ipv4BaseCidr
ingressConfig.defaultListenerNetworks.ipv6BaseCidr.
Apply the new BNKGateway CR file to the namespace.
Note
You cannot change the CIDR range using Insert mode.
You may edit the CIDR range if you experience any one of these situations,
Incorrect CIDR range.
Include or delete a CIDR range
Modify the IP addresses¶
To extend the size of an IP pool (startAddress and endAddress) for the defined CIDR range,
Open the BNKGateway CR (for example, test-bnkgateway.yaml)file in the editor.
Edit the startAddress or/and endAddress of the required IP version (IPv4 or IPv6). The examples in the following table describe the possible edits,
IP address
From
To
Description
IPv4 startAddress
10.42.1.250
10.42.1.248
The start address can only be decreased.
IPv4 endAddress
10.42.1.253
10.42.1.254
The end address can only be increased.
IPv6 startAddress
2001:db8::f1
2001:db8::f0
The start address can only be decreased.
IPv6 endAddress
2001:db8::f4
2001:db8::f6
The IP address can only be increased.
Save and close the file.
You may edit the IP address if you experience any one of these situations,
Increase IP pool size.
Configuration issue due to incorrect IP address.
BNKGateway CR Status¶
This section provides the details of the CR status.
conditions.status |
conditions.reason |
description |
|---|---|---|
True |
Programmed |
CR config sent to all GRPC endpoints |
False |
Waiting |
Waiting for one or more dependent CRs to be applied |
False |
Pending |
CR config deployment is in progress |
False |
Failed |
Failure in sending CR config to grpc endpoints |
Status example - yaml output
status:
conditions:
- lastTransitionTime: "2026-03-18T13:15:51Z"
message: ""
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: "2026-03-18T13:15:51Z"
message: CR config sent to all grpc endpoints
reason: Programmed
status: "True"
type: Programmed