Infra¶
Overview¶
The Infra custom resource centralizes the underlay network configuration for a BIG-IP Next for Kubernetes (BNK) instance.
Use the Infra CRD to define:
IP Address Management (IPAM) pools for address allocation
Network attachment references to Kubernetes NetworkAttachmentDefinition resources
Virtual Routing and Forwarding (VRF) instances for network isolation
VLAN and VXLAN network definitions
Static routes for specific destination prefixes
The Infra CR also provides the default network configuration for any Gateway that does not explicitly reference a GatewaySettings resource.
Note
Infra is a singleton CR. Only one Infra CR can be deployed in the BNK namespace. Deploying multiple Infra CRs is not supported.
Scope and persona¶
Scope: Namespaced. Must be deployed in the BNK namespace.
Persona: Infrastructure provider or network operator.
API details¶
Property |
Value |
|---|---|
API group |
|
API version |
|
Kind |
|
Short name |
|
Scope |
Namespaced |
Spec fields¶
The following sections describe every field available under spec.
ipams¶
Defines IPAM configurations used to allocate IP addresses for VLANs, SNAT pools, and Gateway listener addresses.
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
string |
Yes |
— |
Unique name of this IPAM configuration. Max 255 characters. Pattern: |
|
string |
No |
|
IPAM network view (Infoblox concept). Scopes address allocation to a logical partition. |
|
array |
Yes (min 1) |
— |
Address pools that can be consumed by network references. Max 50 items per IPAM entry. |
ipPools¶
Each entry in the ipPools array defines a pool of IP addresses. You must provide either cidr or both rangeStart and rangeEnd; these options are mutually exclusive.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Conditional |
CIDR notation for the IP pool. Mutually exclusive with |
|
string |
Conditional |
Starting IP address for explicit range mode. Must be used with |
|
string |
Conditional |
Ending IP address for explicit range mode. Must be used with |
|
string |
No |
Availability zone for this IP pool (for example, |
Validation rules:
Either
cidror bothrangeStartandrangeEndmust be provided.cidrandrangeStart/rangeEndare mutually exclusive.rangeStartandrangeEndmust be the same IP family (both IPv4 or both IPv6).
Limits: Maximum 256 IPAM entries. Maximum 64 ipPools per IPAM entry.
networkAttachments¶
Defines named groups of Kubernetes NetworkAttachmentDefinition references used by networks.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Logical name for this network attachment group. Max 255 characters. |
|
array |
Yes (min 1) |
List of NetworkAttachmentDefinition references in this group. |
networkAttachmentDefinitions¶
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Name of the Kubernetes NetworkAttachmentDefinition resource. Max 255 characters. |
vrfs¶
Defines VRF instances available for network and route binding.
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
string |
Yes |
— |
Name of the VRF. Max 255 characters. |
|
boolean |
No |
|
When |
egressDefaults¶
Defines optional defaults for egress tunnel network configuration. If you omit the subnet, the product uses an internal default subnet.
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
string |
No |
|
Subnet used for egress tunnels. Must be a valid IPv4 CIDR notation. |
|
integer |
No |
|
UDP destination port used for VXLAN encapsulation. Valid values: 1–65535. |
|
object |
Yes |
— |
Reference to a |
|
string |
Yes |
— |
Name of a |
networks¶
Defines VLAN and VXLAN network configurations. Each network entry must specify a type of either vlan or vxlan, and then provide the corresponding settings object.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Unique name of the network entry. Max 255 characters. |
|
string |
Yes |
Network type. Accepted values: |
|
object |
Conditional |
VLAN-specific settings. Required when |
|
object |
Conditional |
VXLAN-specific settings. Required when |
Validation rule: For network type vlan, set vlan only. For type vxlan, set vxlan only.
vlan¶
VLAN-specific settings. Required fields: networkAttachmentRef, ipamRefs.
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
integer |
No |
|
802.1Q VLAN tag. Range: 0–4094. |
|
integer |
No |
|
Maximum Transmission Unit (MTU) for the VLAN interface. Range: 576–9198. |
|
string |
No |
— |
Reference to a |
|
string |
Yes |
— |
Reference to a |
|
string |
Yes (min 1) |
— |
Name of a |
vxlan¶
VXLAN-specific settings. Required field: vni.
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
integer |
Yes |
— |
VXLAN Network Identifier (VNI). Range: 0–16777215. |
|
string |
No |
— |
Reference to another |
|
integer |
No |
|
MTU for VXLAN tunnel traffic. Range: 1280–9000. |
|
integer |
No |
|
UDP destination port used for VXLAN encapsulation. Range: 1–65535. |
|
string |
No |
— |
Name of a |
|
string |
No |
— |
Name of a |
|
string |
No |
— |
Reference to a |
staticRoutes¶
Defines static routes programmed in the selected VRF contexts.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Unique name of the static route entry. Max 255 characters. |
|
string |
Yes |
Destination prefix in CIDR notation (for example, |
|
string |
Conditional |
Next-hop IP address. Mutually exclusive with |
|
string |
Conditional |
Reference to a |
|
string |
No |
Reference to a |
Validation rule: Exactly one of nextHop or networkRef must be set.
Status fields¶
The controller populates the status section after reconciliation. All status subsections follow the Gateway API condition structure.
Top-level status¶
Field |
Type |
Description |
|---|---|---|
|
integer |
Most recent |
|
array |
Top-level conditions describing the overall state of the Infra resource. Max 8 conditions. |
Condition types¶
Type |
Description |
|---|---|
|
The resource is syntactically valid and accepted by the controller. |
|
All referenced resources have been resolved. |
|
The configuration has been sent to TMM. |
Each condition includes:
Field |
Type |
Description |
|---|---|---|
|
string |
Condition type name. |
|
string |
One of |
|
string |
Programmatic identifier for the transition reason. |
|
string |
Human-readable message with details about the transition. |
|
date-time |
Timestamp of the last status transition. |
|
integer |
The generation this condition was set for. |
Per-resource status¶
The status section includes sub-status arrays for each resource type defined in spec:
Status section |
Description |
Max items |
|---|---|---|
|
Status for each network attachment. Keyed by |
64 |
|
Status for each network. Includes |
— |
|
Status for each VRF. Keyed by |
64 |
|
Status for each static route. Includes |
64 |
|
Status for each IPAM entry. Includes |
— |
|
Status for |
4094 |
Printer columns¶
When you run kubectl get infra, the following columns display:
Column |
Source |
|---|---|
Programmed |
|
Message |
|
Age |
|
Example¶
apiVersion: gateway.k8s.f5.com/v1alpha1
kind: Infra
metadata:
name: infra
namespace: bnk-system
spec:
# IPAM pools
ipams:
- name: client-pool
infobloxNetview: "default"
ipPools:
- cidr: 11.11.11.0/24
- name: server-pool
infobloxNetview: "default"
ipPools:
- cidr: 22.22.22.0/24
- cidr: 2002::22:22:22:0/112
- name: listener-pool
infobloxNetview: "default"
ipPools:
- cidr: 22.22.22.0/24
- cidr: 2002::22:22:22:0/112
# Network attachment definitions
networkAttachments:
- name: client-attach
networkAttachmentDefinitions:
- name: sriov-client-netattach
- name: server-attach
networkAttachmentDefinitions:
- name: sriov-server-netattach
# Networks
networks:
- name: tmm-client
type: vlan
vlan:
tag: 0
mtu: 1500
networkAttachmentRef:
name: client-attach
ipamRefs:
- name: client-pool
- name: tmm-server
type: vlan
vlan:
tag: 0
mtu: 1500
networkAttachmentRef:
name: server-attach
ipamRefs:
- name: server-pool
# Static routes
staticRoutes:
- name: default-route
destination: 0.0.0.0/0
nextHop: 22.22.22.1
Infra CR deletion¶
After you delete the Infra custom resource, verify that both the IPAM and IPAMRange custom resources have been removed from the BNK namespace before you reapply the custom resource. If you use Infoblox, also confirm that the associated IPs have been released. Ensuring a clean state before you reapply the custom resource prevents unpredictable behavior.