Configuration

All flags, environment variables, ConfigMap settings, and tuning guidance for unbounded-net.

This document describes all configuration options for unbounded-net components. For a conceptual introduction, see Networking Concepts.

Runtime Configuration

Both the controller and node agent load runtime settings from a shared YAML file mounted from the unbounded-net-config ConfigMap.

  • Default path: /etc/unbounded-net/config.yaml
  • Override: --config-file=<path>
  • Startup behavior: fail-fast if the config file is missing or invalid.
  • CLI flags still work as explicit overrides when set.

Config Structure

common:
  azureTenantId: ""           # Only for Azure Portal links in the UI
  apiserverURL: ""            # Override API server URL (empty = in-cluster)
  logLevel: 2                 # klog verbosity (0-10), watched for live changes

controller:
  healthPort: 9999
  nodeAgentHealthPort: 9998
  informerResyncPeriod: 300s
  statusStaleThreshold: 40s
  registerAggregatedAPIServer: true
  leaderElection:
    enabled: true
    leaseDuration: 15s
    renewDeadline: 5s
    retryPeriod: 10s

node:
  cniConfDir: /host/etc/cni/net.d
  cniConfFile: 10-unbounded.conflist
  bridgeName: cbr0
  wireGuardDir: /host/etc/wireguard
  wireGuardPort: 51820
  mtu: 1280
  healthPort: 9998
  tunnelDataplane: ebpf
  tunnelDataplaneMapSize: 16384
  tunnelIPFamily: IPv4
  preferredPrivateEncap: GENEVE
  preferredPublicEncap: WireGuard
  genevePort: 6081
  geneveVni: 1
  vxlanPort: 4789

Controller Configuration

Leader Election

FlagDefaultDescription
--leader-electfalseEnable leader election for HA.
--leader-elect-lease-duration15sDuration of the leader lease.
--leader-elect-renew-deadline5sDeadline for renewing leadership.
--leader-elect-retry-period10sRetry period for acquiring leadership.

Health and Monitoring

FlagDefaultDescription
--health-port9999Health check HTTP server port (0 to disable).
--node-agent-health-port9998Node agent health port (for dashboard links).
--status-stale-threshold40sDuration after which pushed status is stale.
--register-aggregated-apiservertrueEnable aggregated API status endpoints.
--informer-resync-period300sInformer resync interval.

Logging

FlagDefaultDescription
-v0Log verbosity level (0-10).
--logtostderrtrueLog to stderr.

Node Agent Configuration

General

FlagDefaultEnv VarDescription
--node-nameNODE_NAMEName of this node (required).
--health-port9998Health check server port.
--informer-resync-period3600sInformer resync period.
--route-table-id252Custom routing table ID.
--preferred-private-encapGENEVEPreferred encap for internal links.
--preferred-public-encapWireGuardPreferred encap for external links.
--health-flap-max-backoff120sMax backoff for health check flap dampening.

CNI Configuration

FlagDefaultDescription
--cni-conf-dir/etc/cni/net.dCNI configuration directory.
--cni-conf-file10-unbounded.conflistCNI configuration file name.
--bridge-namecbr0Bridge interface name.
--mtu1280MTU for tunnel and bridge interfaces.

MTU Guidance

The node.mtu setting controls the MTU on tunnel and bridge interfaces. Encapsulation overhead:

TypeOverhead
WireGuard80 bytes
GENEVE / VXLAN58 bytes
IPIP20 bytes

Formula: node.mtu = <lowest physical-link MTU> - 80

Using 80 (the largest overhead) ensures the value is safe for all tunnel types. For standard 1500-byte links: 1500 - 80 = 1420.

Behavior:

  • Each node agent detects its default-route interface MTU and annotates itself with net.unbounded-cloud.io/tunnel-mtu.
  • Effective MTU = min(configured MTU, detected MTU).
  • If configured MTU exceeds detected, the node logs an error and surfaces an mtuMismatch status error.
  • A value of 0 is normalized to 1280.

WireGuard

FlagDefaultDescription
--wireguard-dir/etc/wireguardWireGuard key storage directory.
--wireguard-port51820WireGuard listen port.

GENEVE

FlagDefaultDescription
--geneve-port6081GENEVE UDP destination port.
--geneve-vni1GENEVE Virtual Network Identifier.
--geneve-interfacegeneve0GENEVE tunnel interface name.

VXLAN

FlagDefaultDescription
--vxlan-port4789VXLAN UDP destination port.
--vxlan-src-port-low47891VXLAN source port range low.
--vxlan-src-port-high47922VXLAN source port range high.

The narrow source port range (32 ports) limits distinct flows from VMs, helping avoid flow table limits on cloud platforms (e.g., Azure).

Tunnel Dataplane

FlagDefaultDescription
--tunnel-dataplaneebpfebpf (BPF LPM tries) or netlink (per-peer interfaces).
--tunnel-dataplane-map-size16384Max entries per BPF LPM trie map (eBPF only).
--tunnel-ip-familyIPv4Underlay IP family for tunnel encapsulation (IPv4 or IPv6).

Tunnel Protocol Selection

The tunnelProtocol field is available on all scope CRDs:

ValueOverheadEncryptedUse Case
WireGuard80 bytesYesCross-site links over public networks
GENEVE58 bytesNoHigh-throughput internal links
VXLAN~58 bytesNoLinks with VXLAN hardware offload
IPIP20 bytesNoMinimal overhead internal links
None0 bytesNoDirect L3 routing
AutoVariesVariesSystem selects based on link type (default)

When Auto, links using external IPs use WireGuard; internal-only links use the preferred private encap (default GENEVE). The security-wins rule ensures WireGuard is used if any scope explicitly requests it.

See Routing Flows for the full protocol selection algorithm.

Status Push

FlagDefaultDescription
--status-push-enabledtruePush status to controller.
--status-push-interval10sPush interval.
--status-ws-enabledtrueEnable WebSocket transport.
--status-ws-apiserver-modefallbacknever, fallback, or preferred for API server relay.
--status-critical-interval1sMax critical-delta publish frequency.
--status-stats-interval15sMax statistics-delta publish frequency.

Health Check (UDP Probes)

FlagDefaultDescription
--healthcheck-port9997UDP health check probe port (0 to disable).
--base-metric1Base metric for programmed routes.

Health check sessions are automatically created for all routes with nexthops. Route metric adjustment on failure provides fast failover.


Firewall Requirements

PortProtocolDirectionPurpose
51820UDPInboundWireGuard intra-site mesh
51821+UDPInboundWireGuard gateway links
6081UDPInboundGENEVE tunnels
4789UDPInboundVXLAN tunnels
9997UDPInboundHealth check probes
9998TCPInboundNode status endpoint

Resource Requirements

Controller

resources:
  requests: { cpu: 10m, memory: 64Mi }
  limits:   { cpu: 100m, memory: 128Mi }

Node Agent

resources:
  requests: { cpu: 10m, memory: 32Mi }
  limits:   { cpu: 100m, memory: 64Mi }

Scaling

Cluster SizeController MemoryNotes
< 100 nodes64MiLow informer load
100-500 nodes128MiMedium
500-1000 nodes256MiConsider longer resync
> 1000 nodes512Mi+Use --informer-resync-period=600s

Environment Variables

Controller

VariableDescription
LOG_LEVELInitial klog verbosity. For live changes, edit common.logLevel in ConfigMap.
POD_NAMEPod name for leader election identity (downward API).
POD_NAMESPACENamespace for leader election lease (default: kube-system).
POD_IPPod IP for EndpointSlice management.
NODE_NAMENode name, displayed in dashboard.

Node Agent

VariableDescription
LOG_LEVELInitial klog verbosity.
NODE_NAMENode name (required, downward API).

Tuning Recommendations

High Availability

replicas: 2
args:
  - --leader-elect=true
  - --leader-elect-lease-duration=15s
  - --leader-elect-renew-deadline=5s

Large Clusters (1000+ nodes)

# Controller
args:
  - --informer-resync-period=600s

# Node agent
args:
  - --informer-resync-period=7200s

Next Steps