Deploy UPF high availability
Important
UPF Session Controller (UPF-SC) and the User Plane Function (UPF) load balancer (UPF-LB) are experimental, and this deployment is not suitable for production. Their configuration can change in a later release.
UPF Session Controller (UPF-SC) presents a group of User Plane Gateway (UPG) instances to Session Management Functions (SMFs) as one UPF. It communicates with the SMFs and the UPG instances over the Packet Forwarding Control Protocol (PFCP) and places each session on one of the instances. If an instance fails or you drain it, UPF-SC moves its sessions to other instances. The SMF still sees the same tunnel endpoints and User Equipment (UE) IP address for a moved session.
A UPF-SC deployment consists of the following components:
- UPF-SC controllers: one active controller and one or more standby controllers
- PFCP NATS Gateways: a pair that shares the PFCP virtual IP addresses (VIPs) toward the SMFs and the UPG instances
- MySQL: stores the session state
- NATS with JetStream: carries PFCP between the gateways and the controllers, and holds the forwarding entries for UPF-LB
- UPF-LB: forwards User Plane traffic to the UPG instance that serves the session
- UPG instances: handle the User Plane of the sessions
Prerequisites
Before you begin, make sure you have the following:
- HelmOpens in a new tab v3+ and kubectlOpens in a new tab configured to access the Core Cluster
- The
upf-scandupf-sc-supportHelm charts fromoci://registry.cennso.com/cennso/charts, version 3.2.0 - An existing MySQL database whose user can create tables, because UPF-SC creates its schema but not the database
- NATS 2.12 or later with JetStream
- UPG instances deployed with
UPGDeployment, reachable from the PFCP NATS Gateways - Fast Path Provider (FPP) 3.2.0 with a
CGWDeploymentresource for UPF-LB. UPF-LB supports IPv4 only.
Caution
The admin HTTP API and NATS do not use TLS. Keep the admin port and NATS on a trusted network.
Steps
In the commands, {UPF_SC_CHART} is the upf-sc chart.
To deploy UPF-SC, follow these steps:
Create the namespace:
bashAdd a
Secretresource with the MySQL Data Source Name (DSN):bashStore the admin token in a second
Secretresource:bashCreate a values file named
upf-sc-values.yaml. The following example deploys two controllers and a gateway pair for two UPG instances:yamlAdjust the values file to your network:
- List each UPG instance under dynamic_config.bootstrap.upfs.
- Set pfcp_address to the address of the spec.instances.{NAME}.networking.sx network of the instance.
- Use the addresses of the spec.instances.{NAME}.networking.grx and spec.instances.{NAME}.networking.sgi networks as the
accessandsgiaddresses. - Keep pfcp.node_id and the udp.address values the same in the controllers and the gateways.
- Give the gateways the same nats settings as the controllers.
- Set require_local_address only in the gateway configuration. The controllers reject it.
- Set pfcpGateway.vip.virtualRouterID to a Virtual Router Redundancy Protocol (VRRP) ID that no other VRRP group on the segment uses.
UPF-SC uses dynamic_config.bootstrap only at the first start, when the database has no saved configuration. To change the UPG instances later, use the
upf-scCLI. See Manage UPG instances.Install the
upf-scchart:Caution
A newer UPF-SC version upgrades the database schema when it starts. You cannot downgrade after that.
bashDeploy UPF-LB in a
CGWDeploymentresource. In spec.upflbConfig.spec, set the following parameters:- nats.bucket to the load_balancer.nats.kv_bucket value
- nwis[].ownIP of the
accessNetwork Instance (NWI) to the load_balancer.nwis[].external_addr value - uePools[] to the prefixes of dynamic_config.bootstrap.pools
For the other parameters, see Set up UPF load balancing.
Configure the SMFs to use
192.0.2.20, the address of pfcp.external.udp.address, as the UPF address.
The SMFs associate with UPF-SC, and UPF-SC places new sessions on the UPG instances.
Verification
To check the deployment, follow these steps:
Check that the pods are running:
bashSample output:
textFind the active controller. Run the following command for each controller pod:
bashSample output of the active controller:
textThe active controller reports
lease heldastrue. The other controllers are standby.Check the UPG instances in the active controller pod,
{ACTIVE_POD}:bashSample output:
textFor each UPG instance,
STATEisactiveandASSOCIATEDistrue.
Manage UPG instances
Run the upf-sc CLI in the active controller pod to change the group of UPG instances. The SMFs do not see these changes. To change an existing instance, get the current revision, {REVISION}, with the following command:
Add a UPG instance
To add a UPG instance, run the following command with the addresses of the instance:
UPF-SC places new sessions on the new instance until all instances hold the same number of sessions.
Drain a UPG instance
To stop placing sessions on a UPG instance and move its sessions to other instances, run the following command:
UPF-SC moves all sessions of the instance to the other instances. If the other instances have no capacity, the sessions stay on the instance. To place sessions on the instance again, get the new revision with upf-sc config get. Then run the following command:
Remove a UPG instance
Caution
upf-sc delete upf moves all sessions of the instance to other instances and then removes the instance. Make sure that the other instances have capacity for these sessions.
To remove a UPG instance from the group, run the following command:
UPF-SC no longer lists the instance in upf-sc get upfs.