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 F5 BIG-IP for Kubernetes is optional.

Use cases

This section lists how the application behaves when BNKGateway is applied and not applied.

BNKGateway is applied

  • F5 IPAM controller assigns the IP address if BNKGateway CR is applied and a reference is added to Gateway CR.

  • The static IP address is validated based on the CIDR specified in the BNKGateway CR if BNKGateway CR is applied and a reference is added to Gateway CR with a static IP address.

BNKGateway is not applied

  • The IP address is not assigned if BNKGateway CR is not applied and no static IP address is provided in Gateway CR.

  • The static IP address is assigned and does not validate duplicates if BNKGateway CR is not applied and a static IP address is provided in Gateway CR, but not referred to BNKGateway.

  • The IP address is not assigned if BNKGateway CR is not applied and a static IP address is provided in Gateway CR, but referred to BNKGateway.

Sample BNKGateway CR

This example CR shows how to configure IPv4 as the default listener network and CIDR range.

apiVersion: k8s.f5net.com/v1
kind: F5BnkGateway
metadata:
  name: my-gateway
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 Parameters

This section provides the list of parameters and the related attributes of the BNK Gateway. You must deploy BNK Gateway 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 BNK Gateway.

Parameter Description
ingressConfig
object
Specifies that the configuration is for ingress traffic.
ingressConfig.defaultListenerNetworks
array
Specifies the list of default listener networks.
ingressConfig.defaultListenerNetworks.items.name
srting
Specifies name or label for identifying the IP Block.
Note: This is a required field, and the string should have a minimum of one character.
ingressConfig.defaultListenerNetworks.items.ipv4BaseCidr
string
Specifies the base CIDR for IPv4 addresses.
ingressConfig.defaultListenerNetworks.items.ipv6BaseCidr
string
Specifies the base CIDR for IPv6 addresses.
ingressConfig.defaultListenerNetworks.items.startAddress
string
Specifies the starting address of the network range. The value can be for either IPv4 or IPv6.
ingressConfig.defaultListenerNetworks.items.endAddress
string
Specifies the last address of the network range. The value can be for either IPv4 or IPv6.

Create BNKGateway CR

To create the BNKGateway CR in the namespace with CIDR range,

  1. Copy the above sample code to a yaml file. For eg:<test-bnkgateway>.yaml

  2. Modify and save the yaml file.

  3. Verify if the CNE controller is installed in the namespace.

  4. Apply the BNKGateway CR in the same namespace where the CNE controller is installed.

For example

kubectl apply -f <test-bnkgateway>.yaml -n <namespace-name> 

Note: You can configure multiple CIDR ranges in a BNKGateway CR. For example, one range for IPv4 and another for IPv6.*

Modify BNKGateway CR

To modify the CIDR range of the configured network,

  1. Delete the CR.

  2. Modify spec  in the YAML file.

  3. Apply the CR to the namespace.

Note: BNKGateway CR cannot be updated. The CR must be deleted and recreated.

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