With route advertisements enabled, the OVN-Kubernetes network plugin supports advertising network routes for the default pod network and cluster user-defined (CUDN) networks to the provider network, including egressIPs, and importing routes from the provider network to the default pod network and CUDNs. From the provider network, IP addresses advertised from the default pod network and CUDNs can be reached directly.
For example, you can import routes to the default pod network so you no longer need to manually configure routes on each node. Previously, you might have been using local gateway mode (RoutingViaHost=true
) and manually configuring routes on each node to approximate a similar configuration. With route advertisements you can accomplish this seamlessly and you can use shared gateway mode (RoutingViaHost=false
) as well.
Route reflectors on the provider network are supported and can reduce the number of BGP connections required to advertise routes on large networks.
If you use egressIPs with route advertisements enabled, the layer 3 provider network is aware of egressIP failovers. This allows you to locate cluster nodes that host egressIPs on different layer 2 segments whereas before only the layer 2 provider network was aware so that required all the egress nodes to be on the same layer 2 segment.
Advertising routes with border gateway protocol (BGP) is supported on the following infrastructure types:
Infrastructure requirements
To use route advertisements, you must have configured BGP for your network infrastructure. Outages or misconfigurations of your network infrastructure might cause disruptions to your cluster network.
Compatibility with other networking features
Route advertisements support the following OKD Networking features:
- Multiple external gateways (MEG)
-
MEG is not supported with this feature.
- egressIPs
Supports the use and advertisement of egressIPs. The node where an egress IP address resides advertises the egressIP. An egress IP address must be on the same layer 2 network subnet as the egress node. The following limitations apply:
-
Advertising egressIPs from a user-defined network (CUDN) operating in layer 2 mode are not supported.
-
Advertising egressIPs for a network that has both egress IP addresses assigned to the primary network interface and egress IP addresses assigned to additional network interfaces is impractical. All egressIPs are advertised on all of the BGP sessions of the selected FRRConfiguration instances, regardless of whether these sessions are established over the same interface that the egressIP is assigned to or not, potentially leading to unwanted advertisements.
- Services
-
Works with the MetalLB Operator to advertise services to the provider network.
- egress service
-
Full support.
- egress firewall
-
Full support.
- egress QoS
-
Full support.
- Network policies
-
Full support.
- Direct pod ingress
-
Full support for the default cluster network and cluster user-defined (CUDN) networks.
The MetalLB Operator is installed as an add-on to the cluster. Deployment of the MetalLB Operator automatically enables FRR-K8s as an additional routing capability provider. This feature and the MetalLB Operator use the same FRR-K8s deployment.
Considerations for naming cluster user-defined networks (CUDNs)
When referencing a VRF device in a FRRConfiguration
CR, the VRF name is the same as the CUDN name for VRF names that are less than or equal to 15 characters. It is recommended to use a VRF name no longer than 15 characters so that the VRF name can be inferred from the CUDN name.
BGP routing custom resources
The following custom resources (CRs) are used to configure route advertisements with BGP:
RouteAdvertisements
-
This CR defines the advertisements for the BGP routing. From this CR, the OVN-Kubernetes controller generates a FRRConfiguration
object that configures the FRR daemon to advertise cluster network routes. This CR is cluster scoped.
FRRConfiguration
-
This CR is used to define BGP peers and to configure route imports from the provider network into the cluster network. Before applying RouteAdvertisements
objects, at least one FRRConfiguration object must be initially defined to configure the BGP peers. This CR is namespaced.
OVN-Kubernetes controller generation of FRRConfiguration
objects
An FRRConfiguration
object is generated for each network and node selected by a RouteAdvertisements
CR with the appropriate advertised prefixes that apply to each node. The OVN-Kubernetes controller checks whether the RouteAdvertisements
-CR-selected nodes are a subset of the nodes that are selected by the RouteAdvertisements
-CR-selected FRR configurations.
Any filtering or selection of prefixes to receive are not considered in FRRConfiguration
objects that are generated from the RouteAdvertisement
CRs. Configure any prefixes to receive on other FRRConfiguration
objects. OVN-Kubernetes imports routes from the VRF into the appropriate network.
Cluster Network Operator configuration
The Cluster Network Operator (CNO) API exposes several fields to configure route advertisements:
-
spec.additionalRoutingCapabilities.providers
: Specifies an additional routing provider, which is required to advertise routes. The only supported value is FRR
, which enables deployment of the FRR-K8S daemon for the cluster. When enabled, the FRR-K8S daemon is deployed on all nodes.
-
spec.defaultNetwork.ovnKubernetesConfig.routeAdvertisements
: Enables route advertisements for the default cluster network and CUDN networks. The spec.additionalRoutingCapabilities
field must be set to FRR
to enable this feature.