This document provides a successful approach to deploying Janus on Kubernetes effectively.
To generate UDP route configurations with multiple ports:
# Note: UDP routes cannot exceed 16 due to Kubernetes' limitation on UDP routes
python3 port-ranger.py ./udpRoutes_template.yaml janus 10000 13500 UDP ./udp_routes_generated.yaml --chunk-size 16
To create service configurations for multiple ports:
python3 port-ranger.py ./service_template.yaml janus 10000 13500 UDP ./service_generated.yaml
- Local deployment was tested on minikube with the Envoy Gateway API.
- Ensure the following are installed and properly set up:
- Minikube cluster
- Envoy CRD (Custom Resource Definitions)
This guide uses a UDP port range of 10000-11000, providing 1000 UDP ports. Under the assumption that each user utilizes 4 UDP ports for media traversal, this configuration supports up to 250 concurrent users. To support more users, increase the port range using port-ranger
.
Run the following script to initialize the Janus configuration in config-map:
./update_conf.sh
Apply the configurations in the following order:
kubectl apply -f gatewayClass.yaml
kubectl apply -f gateway.yaml
kubectl apply -f btp.yaml
kubectl apply -f httpRoutes.yaml
kubectl apply -f udp_routes_generated.yaml
kubectl apply -f deployment.yaml
kubectl apply -f service_generated.yaml
Update your /etc/hosts
file with the following entries:
# /etc/hosts
127.0.0.1 janus-0.example.local
127.0.0.1 janus-1.example.local
127.0.0.1 janus-2.example.local
If everything is correctly configured, you can access the Janus server using the following endpoints:
curl http://janus-0.example.local/rest/janus/info
http://janus-0.example.local/ws
http://janus-0.example.local/admin-ws
- Ensure the port range used matches the one specified in your configuration.
- For larger-scale deployments, adjust the port range and user calculations accordingly.
By following this guide, you should be able to successfully deploy and test Janus on Kubernetes.