Dedicated Backup Networks in OpenShift Virtualization
Overview
When deploying Trilio for Kubernetes in OpenShift Virtualization environments, you may want to isolate backup traffic to a dedicated network to improve performance, security, and bandwidth management. This document outlines the configuration options and best practices for implementing dedicated backup networks using Network Attachment Definitions (NADs).
Background
In OpenShift environments, OVN (Open Virtual Network) is the default Software Defined Networking (SDN) solution. By default, OVN uses its own routing table and may not follow the standard kernel routing table. To enable pods to use secondary networks and follow kernel routing paths, specific configurations are required.
Key Concepts
Network Attachment Definitions (NADs): Custom resources that define additional network interfaces for pods
OVN Routing: OpenShift's default SDN routing behavior
Kernel Routing Table: The host's standard routing table that can be leveraged with proper configuration
Configuration Methods
Method 1: Using Network Attachment Definitions with Pod Annotations
This is the recommended approach for configuring dedicated backup networks.
Step 1: Create a Network Attachment Definition
Create a NAD resource in the trilio-system namespace:
Add the network annotation to your TVM configuration:
Note: To ensure Trilio pods use the secondary network, pass the Multus networks annotation under spec.helmValues.podAnnotations in the TrilioVaultManager CR, for example: k8s.v1.cni.cncf.io/networks: backup-network.
Step 3: Verify Configuration
To verify secondary network attachment for data transfer, start a backup and wait for the data upload phase to begin. Then check the datamover pod:
Expected output should show both the default ovn-kubernetes network and your backup network:
Method 2: Enabling Host Routing via Cluster Network Operator
For environments where you want pods to follow the kernel routing table instead of OVN's routing table:
Configure the Cluster Network Operator
Set the routingViaHost parameter to true in the Cluster Network Operator configuration:
Note: This configuration affects all pods in the cluster and should be carefully considered in production environments.
# Find the datamover pod for the running backup
oc get pods -n <backup-namespace> | grep datamover
# Verify the secondary network on the datamover pod
oc get pod <datamover-pod-name> -n <backup-namespace> -o jsonpath='{.metadata.annotations.k8s\.v1\.cni\.cncf\.io/network-status}' | jq