Deploying 5G core network with Free5GC, Kubernetes and Helm
Happy devSecOps
Background
In my previous post I have discussed about deploying 5G core network with Open5GS
and configuring 5G UE
& 5G RAN
simulator with UERANSIM
. In this post I’m gonna discuss about deploying Free5GC
based 5G core network with Kubernetes
and Helm
. The monitoring of the services done with Prometheus/Grafana
. All the deployments which related to this post available on gitlab. Please clone the repo and continue the post.
Free5GC
Free5GC
is an open-source project for 5th generation (5G) mobile core networks. It is the first open-source 5G core network in the world to conform to the 3GPP Release 15 (R15)
international standards. Free5GC’s original goal was to provide academics with a platform to test and prototype 5G systems. However, due to Free5GC’s completeness and open source code, it also has commercial value, especially for private 5G networks.
Free5GC-based 5G core network can be deployed with Kubernetes using Helm charts. Orange-OpenSource
provides open source Helm charts to deploy Free5GC with Kubernetes. Following are the main steps to follow to deploy the Free5GC 5G network on Kubernetes.
Configure Kubernetes
I have run the single node Minikube Kubernetes cluster on AWS Ubuntu 20.04
server. To run Free5GC services I had to enable 4 CPUs, 8 GB Memory
for Kubernetes cluster(otherwise prods may stop saying Insufficient cpu/memory
).
For handle the networking in Kubernetes cluster I have used Calico
container network interface(CNI) plugin. CNI supports plugin-based functionality to simplify networking in Kubernetes. By default Kubernetes using the Kubenet
plugin to handle networking(e.g handling incoming/outgoing requests). Kubenet is a very basic plugin that doesn’t have many features. If we need more features like isolation between namespaces
, IP filtering
, traffic mirroring
or changing load balancing algorithms
then other network plugins should be used. There are various CNI plugins available, Flannel
, Calico
, WeaveNet
, Cilium
, Canal
. In this scenario I have used Calico
CNI plugin. With Calico
I have assigned static IPs to pods, enable SCTP
traffic on cluster etc.
Enable Multus-CNI Plugin
Multus-CNI
is a CNI plugin for Kubernetes that enables attaching multiple network interfaces to pods. Typically, in Kubernetes each pod only has one network interface (apart from a loopback. With Multus you can create a multi-homed pod that has multiple interfaces. This is accomplished by Multus acting as a meta-plugin
, a CNI plugin that can call multiple other CNI plugins.
To run Multus-CNI, first I need to install a Kubernetes CNI plugin to serve the pod-to-pod network, I have used Calico
CNI plugin. The Calico
CNI plugin creates the default network
interface that every pod will be created with. Each network attachment created by Multus will be in addition to this default network interface.
Deploy Helm Chart
Once configured the K8s cluster and the CNI, I can deploy the Free5GC 5G core network services with Helm charts. I have used the Free5GC Helm chart provided by Orange-OpenSource
.
Free5GC Web UI
Free5GC provides Web UI to configure the UE devices and other configurations in the 5G core network. The Web UI is exposed with a Kubernetes service with nodePort=30500
. I can access it by using this url {replace-by-the-IP-of-one-of-your-cluster-nodes}:30500
or Kubernetes port forwarding. In the Web UI, I can register the UE device configurations. I have deployed the 5G core services on AWS. To access the Web UI service from my local machine I have done SSH port forwarding.
Then I can register a subscriber(UE device) via the Web UI. Read more information about UE device configuration in the Web UI from my previous post.
Service Monitoring
To monitor the 5G core services on Kubernetes I have used Prometheus
. The visualization done with Grafana
. prometheus-community
provides Helm chart to install the Prometheus/Grafana services. Following are some services available on prometheus-community.
Reference
- https://diamanti.com/tutorial-5g-core-on-diamanti/
- https://levelup.gitconnected.com/opensource-5g-core-with-service-mesh-bba4ded044fa
- https://github.com/Orange-OpenSource/towards5gs-helm
- https://www.kubermatic.com/blog/5g-core-deployment-using-kubermatic-kubeone/
- https://gitlab.com/nctuwinlab/2019-free5gc-handbooks/wnc/-/blob/master/3-Deploy-free5GC-CNFs-on-K8s.md
- https://dev.to/kaitoii11/deploy-prometheus-monitoring-stack-to-kubernetes-with-a-single-helm-chart-2fbd
- https://www.linuxtechi.com/how-to-install-minikube-on-ubuntu/
- https://github.com/tliron/open5gs-k8s
- https://gitlab.com/nctuwinlab/2019-free5gc-handbooks/wnc/-/blob/master/3-Deploy-free5GC-CNFs-on-K8s.md