Prerequisites
Docker image registry
You must have valid credentials to access the Netaxis public Docker registry in order to download the SRE container images.
[root@k8s ~]# kubectl create secret docker-registry netaxis-registry-secret \
--docker-server=https://docker-public.bxl.netaxis.be \
--docker-username=<USERNAME> \
--docker-password=<PASSWORD>Verify that the secret has been successfully created:
[root@k8s ~]# kubectl describe secret netaxis-registry-secret
Name: netaxis-registry-secret
Namespace: default
Labels: <none>
Annotations: <none>
Type: kubernetes.io/dockerconfigjson
Data
====
.dockerconfigjson: 138 bytesAttach the secret to the default ServiceAccount:
[root@k8s ~]# kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "netaxis-registry-secret"}]}'
serviceaccount/default patchedHelm
Helm is required to install SRE and the associated databases.
Refer to the official Helm documentation for detailed installation instructions appropriate for your Kubernetes cluster.
Install Operator for Postgres
Add the Helm repository for PostgreSQL:
[root@k8s ~]# helm repo add cnpg https://cloudnative-pg.github.io/chartsVerify that the repository has been added:
[root@k8s ~]# helm repo list
NAME URL
cnpg https://cloudnative-pg.github.io/chartsInstall the PostgreSQL operator:
[root@k8s ~]# helm upgrade --install cnpg cnpg/cloudnative-pg --namespace cnpg-system --create-namespaceInstall Operator for MongoDB (optional)
A MongoDB cluster is required for the following features:
- call admission control
- global caching nodes
- registrar
If you do not intend to use these features, you may skip this section and the subsequent Create MongoDB cluster (optional).
Add the Helm repository for MongoDB:
[root@k8s ~]# helm repo add mongodb https://mongodb.github.io/helm-chartsVerify that the repository has been added:
[root@k8s ~]# helm repo list
NAME URL
mongodb https://mongodb.github.io/helm-charts
...Install the MongoDB operator:
[root@k8s ~]# kubectl apply -f https://raw.githubusercontent.com/mongodb/mongodb-kubernetes/1.2.0/public/crds.yaml
[root@k8s ~]# helm upgrade --install mongodb-kubernetes-operator mongodb/mongodb-kubernetes --namespace mongodb --create-namespaceInstallation of SRE
Create Postgres cluster
Save the following manifest as sre-pg-cluster.yaml and adjust the parameters as required:
- stringData.password: the password for the sre user in PostgreSQL.
- spec.instances: the number of PostgreSQL instances to deploy. Read-heavy workloads may benefit from increasing this value.
- storage.size: the storage size, depending on your data retention and capacity requirements.
apiVersion: v1
kind: ConfigMap
metadata:
name: kamailio-tables
data:
kamailio-tables.sql: |
CREATE TABLE dispatcher (
id SERIAL PRIMARY KEY NOT NULL,
destination VARCHAR(192) DEFAULT '' NOT NULL,
refresh_time TIMESTAMP,
CONSTRAINT dispatcher_table_destination_idx UNIQUE (destination)
);
ALTER TABLE dispatcher OWNER TO sre;
---
apiVersion: v1
kind: Secret
metadata:
name: sre-user-secret
type: kubernetes.io/basic-auth
stringData:
username: sre
password: supersecretpw
---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: sre-pg-cluster
labels:
release: prometheus
spec:
instances: 3
monitoring:
enablePodMonitor: false
bootstrap:
initdb:
database: sre
owner: sre
secret:
name: sre-user-secret
postInitApplicationSQLRefs:
configMapRefs:
- name: kamailio-tables
key: kamailio-tables.sql
managed:
roles:
- name: sre
ensure: present
login: true
createdb: true
inRoles:
- pg_monitor
storage:
size: 1GiApply the manifest:
kubectl apply -f sre-pg-cluster.yamlIf you intend to monitor the PostgreSQL cluster with Prometheus/Grafana, save the following manifest as sre-pg-prometheus.yaml:
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: sre-pg-podmonitor
labels:
release: prometheus
spec:
selector:
matchLabels:
"cnpg.io/cluster": sre-pg-cluster
podMetricsEndpoints:
- port: metrics
path: /metricsApply it using:
kubectl apply -f sre-pg-prometheus.yamlCreate MongoDB cluster (optional)
Save the following manifest as sre-mongo-cluster.yaml and adjust the configuration as required:
- stringData.password: the password for MongoDB and Prometheus metrics access.
- spec.members: the number of MongoDB instances to deploy. Read-heavy workloads may benefit from increasing this value.
apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
name: sre-mongodb
spec:
members: 3
type: ReplicaSet
version: "6.0.5"
security:
authentication:
modes: ["SCRAM"]
prometheus:
# Metrics endpoint HTTP Basic Auth username
username: prometheus-username
# Metrics endpoint HTTP Basic Auth password
passwordSecretRef:
name: metrics-endpoint-password
users:
- name: sre-user
db: admin
passwordSecretRef: # a reference to the secret that will be used to generate the user's password
name: sre-user-password
roles:
- name: clusterAdmin
db: admin
- name: userAdminAnyDatabase
db: admin
scramCredentialsSecretName: sre-scram
additionalMongodConfig:
storage.wiredTiger.engineConfig.journalCompressor: zlib
# the user credentials will be generated from this secret
# once the credentials are generated, this secret is no longer required
---
apiVersion: v1
kind: Secret
metadata:
name: sre-user-password
type: Opaque
stringData:
password: your-password-here
---
apiVersion: v1
kind: Secret
metadata:
name: metrics-endpoint-password
type: Opaque
stringData:
password: 'Not-So-Secure!'
username: prometheus-usernameApply the manifest:
kubectl apply -f sre-mongo-cluster.yamlIf you plan to monitor the MongoDB cluster with Prometheus/Grafana, save the following manifest as sre-mongo-prometheus.yaml:
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
annotations:
# This needs to match `spec.ServiceMonitorSelector.matchLabels` from your
# `prometheuses.monitoring.coreos.com` resouce.
labels:
release: prometheus
name: mongodb-sm
spec:
endpoints:
# Configuring a Prometheus Endpoint with basic Auth.
# `prom-secret` is a Secret containing a `username` and `password` entries.
- basicAuth:
password:
key: password
name: metrics-endpoint-password
username:
key: username
name: metrics-endpoint-password
# This port matches what we created in our MongoDB Service.
port: prometheus
# If using HTTPS enabled endpoint, change scheme to https
scheme: http
# Configure different TLS related settings. For more information, see:
# https://github.com/prometheus-operator/prometheus-operator/blob/main/pkg/apis/monitoring/v1/types.go#L909
# tlsConfig:
# insecureSkipVerify: true
# What namespace to watch
namespaceSelector:
matchNames:
- mongodb
# Service labels to match
selector:
matchLabels:
app: sre-mongodb-svcApply it using:
kubectl apply -f sre-mongo-prometheus.yamlInstall the SRE Helm chart
Configuration options
The table below lists the configuration options available for SRE deployment:
| Key | Subkey | Description | Default Value | Required |
|---|---|---|---|---|
| image | Docker image used for the SRE deployment | docker-public.bxl.netaxis.be/repo/sre/sre-allinone:latest | No | |
| lb-image | Docker image for the SIP load balancer component | docker-public.bxl.netaxis.be/repo/sre/siplb:6.0.3 | No | |
| timezone | Sets the system timezone | Yes | ||
| call-processors-count | Number of call-processing instances to spawn | 0 | No | |
| http-processors-count | Number of HTTP-processing instances to spawn | 0 | No | |
| enum-processors-count | Number of ENUM processors to spawn | 0 | No | |
| media-processors-count | Number of media-processing instances to run | 0 | No | |
| storage-class | Kubernetes storage class for persistent volumes. Default value not recommended for production. | local-path | No | |
| cdr-storage-size | Storage size for cdrs in Gb | 5 | No | |
| ingress | host | FQDN used to expose HTTP interfaces (GUI/REST/HTTP) | Yes | |
| sip | port | sip port to be exposed on sip load balancer | 5060 | No |
| db | host | Hostname or IP address of R/W postgres instance | Yes | |
| db | ro_host | Hostname or IP address of R/O postgres instance | Yes | |
| db | password | Password for the database connection | Yes | |
| mongo | host | MongoDB host | No | |
| mongo | user | Username used to authenticate with MongoDB | Required if host is set | |
| mongo | password | Password for MongoDB authentication | Required if host is set | |
| mongo | replica_set | MongoDB replica set name for high availability | sre-mongodb | No |
Create a sre-values.yaml file containing all parameters required for your deployment.
Copy the SRE Helm package and install it using:
[root@k8s ~]# helm install sre-prod sre-4.2.0.tgz -f sre-values.yamlVerify SRE is installed using:
[root@k8s ~]# helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
sre-prod default 1 2025-11-07 14:08:34.187070322 +0100 CET deployed sre-4.2.0Upgrades
To upgrade SRE, update the Docker image version tags in sre-values.yaml and execute:
[root@k8s ~]# helm upgrade sre-prod -f sre-values.yamlUninstall of SRE
To remove the SRE deployment:
[root@k8s ~]# helm uninstall sre-prod
release "sre-prod" uninstalled