### Helper script parameters example Source: https://github.com/l7mp/stunner/blob/main/docs/examples/benchmark/README.md Example of how to use the helper script with specific parameters for benchmarking. ```bash ./benchmark.sh -n 5 -t 5 -s 1000 -b 100000 -p k8s ``` -------------------------------- ### Install the Application Source: https://github.com/l7mp/stunner/blob/main/docs/examples/kurento-magic-mirror/README.md Installs the WebRTC application and Kurento media servers, along with their corresponding services and Kubernetes objects. ```bash git clone https://github.com/l7mp/stunner cd stunner kubectl apply -f docs/examples/kurento-magic-mirror/kurento-magic-mirror-server.yaml ``` -------------------------------- ### UDP Multithreading Configuration Source: https://github.com/l7mp/stunner/blob/main/docs/INSTALL.md Example YAML configuration for enabling UDP multithreading and setting the number of read loops per UDP listener. ```yaml udpMultithreading: enabled: true readLoopsPerUDPListener: 16 ``` -------------------------------- ### Install STUNner premium using Helm Source: https://github.com/l7mp/stunner/blob/main/docs/PREMIUM_INSTALL.md Command to add the STUNner Helm repository, update it, and install the premium version of STUNner, specifying the customer key and namespace. ```console helm repo add stunner https://l7mp.io/stunner helm repo update helm install stunner stunner/stunner-premium --create-namespace --namespace=stunner-system --set stunnerGatewayOperator.customerKey="" ``` -------------------------------- ### Install stunnerctl using Go toolchain Source: https://github.com/l7mp/stunner/blob/main/cmd/stunnerctl/README.md Installs the stunnerctl binary using the standard Go toolchain and adds it to the system's PATH. ```console go install github.com/l7mp/stunner/cmd/stunnerctl@latest ``` -------------------------------- ### Install STUNner into the Secondary Cluster Source: https://github.com/l7mp/stunner/blob/main/docs/examples/cloudretro/README.md Installs STUNner into the secondary cluster, repeating the setup steps from the single-cluster configuration. ```bash ./stunner-setup-for-cloudretro.sh secondary ``` -------------------------------- ### Install STUNner using Helm Source: https://github.com/l7mp/stunner/blob/main/README.md Installs the STUNner Helm chart, adding the repository and performing the installation. Ensure you have Helm installed and configured. ```console helm repo add stunner https://l7mp.io/stunner helm repo update helm install stunner stunner/stunner --create-namespace --namespace=stunner-system ``` -------------------------------- ### Install STUNner and Jitsi Source: https://github.com/l7mp/stunner/blob/main/docs/examples/jitsi/README.md Clones the STUNner repository, navigates into the directory, and applies the Jitsi call configuration. ```console git clone https://github.com/l7mp/stunner cd stunner kubectl apply -f docs/examples/jitsi/jitsi-call-stunner.yaml ``` -------------------------------- ### Install STUNner Source: https://github.com/l7mp/stunner/blob/main/docs/examples/elixir-webrtc/README.md Clone the STUNner repository and apply the nexus-call-stunner.yaml manifest. ```bash git clone https://github.com/l7mp/stunner cd stunner kubectl apply -f docs/examples/elixir-webrtc/nexus-call-stunner.yaml ``` -------------------------------- ### Check STUNner Objects Source: https://github.com/l7mp/stunner/blob/main/docs/examples/direct-one2one-call/README.md Command to verify the installation of STUNner related Kubernetes objects. ```console kubectl get gatewayconfigs,gateways,udproutes.stunner.l7mp.io -n stunner ``` -------------------------------- ### Install stable version of STUNner Source: https://github.com/l7mp/stunner/blob/main/docs/INSTALL.md Helm command to install the stable version of STUNner, creating the stunner-system namespace. ```bash helm install stunner stunner/stunner --create-namespace --namespace=stunner-system ``` -------------------------------- ### Install STUNner and apply configuration Source: https://github.com/l7mp/stunner/blob/main/docs/examples/livekit/README.md Clone the STUNner repository and apply the provided configuration file to deploy STUNner and configure it for LiveKit. ```bash git clone https://github.com/l7mp/stunner cd stunner kubectl apply -f docs/examples/livekit/livekit-call-stunner.yaml ``` -------------------------------- ### Kubernetes Measurement Output Example Source: https://github.com/l7mp/stunner/blob/main/docs/examples/benchmark/README.md Example output from a Kubernetes STUNner benchmark measurement. ```text Number of concurrent turncat clients: 5 Evaluation time: 1 sec Packet size: 1000 bytes Bandwidth: 1000 Kbits/sec or 1 Mbits/sec per turncat client Platform: k8s Results [ ID] Interval Transfer Bandwidth Jitter Lost/Total Latency avg/min/max/stdev PPS inP NetPwr [ 3] 0.0000-4.9589 sec 613 KBytes 1.01 Mbits/sec 0.756 ms 0/ 628 (0%) 7.780/ 7.094/56.286/ 4.166 ms 127 pps 985 Byte 16.28 [ 4] 0.0000-4.9592 sec 613 KBytes 1.01 Mbits/sec 0.623 ms 0/ 628 (0%) 7.739/ 7.121/56.342/ 4.182 ms 127 pps 980 Byte 16.36 [ 6] 0.0000-4.9579 sec 613 KBytes 1.01 Mbits/sec 0.593 ms 0/ 628 (0%) 8.019/ 7.363/57.748/ 4.300 ms 127 pps 1016 Byte 15.80 [ 5] 0.0000-4.9577 sec 613 KBytes 1.01 Mbits/sec 0.769 ms 0/ 628 (0%) 7.949/ 7.222/58.249/ 4.400 ms 127 pps 1007 Byte 15.94 [ 7] 0.0000-4.9600 sec 613 KBytes 1.01 Mbits/sec 1.017 ms 0/ 628 (0%) 7.886/ 7.230/55.612/ 4.098 ms 127 pps 998 Byte 16.06 [SUM] 0.0000-4.9643 sec 2.99 MBytes 5.06 Mbits/sec 0.000 ms 0/ 3140 (0%) [ ID] Interval Transfer Bandwidth Jitter Lost/Total Latency avg/min/max/stdev PPS inP NetPwr [ 8] 0.0000-4.9594 sec 625 KBytes 1.03 Mbits/sec 0.078 ms 0/ 628 (0%) 8.837/ 7.591/56.173/ 6.396 ms 129 pps 1.11 KByte 14.60 [ 6] 0.0000-4.9435 sec 604 KBytes 1.00 Mbits/sec 0.112 ms 9/ 628 (1.4%) 7.554/ 7.313/11.592/ 0.385 ms 125 pps 946 Byte 16.58 [ 4] 0.0000-4.9519 sec 605 KBytes 1.00 Mbits/sec 0.091 ms 8/ 628 (1.3%) 7.950/ 7.735/11.985/ 0.371 ms 125 pps 995 Byte 15.75 [ 3] 0.0000-4.9594 sec 613 KBytes 1.01 Mbits/sec 0.081 ms 0/ 628 (0%) 8.339/ 7.792/56.527/ 4.156 ms 127 pps 1.03 KByte 15.18 [ 5] 0.0000-4.9441 sec 604 KBytes 1.00 Mbits/sec 0.123 ms 9/ 628 (1.4%) 7.538/ 7.320/11.560/ 0.363 ms 125 pps 944 Byte 16.61 [SUM] 0.0000-4.9597 sec 2.98 MBytes 5.04 Mbits/sec 0.000 ms 14/ 3140 (0.45%) [SUM] 0.0000-4.9597 sec 12 datagrams received out-of-order ``` -------------------------------- ### Performance measuring locally without Kubernetes example Source: https://github.com/l7mp/stunner/blob/main/docs/examples/benchmark/README.md Command to execute a local performance benchmark using the helper script. ```bash ./benchmark.sh -n 5 -t 5 -s 1000 -b 100000000 -p local ``` -------------------------------- ### Install turncat using Go toolchain Source: https://github.com/l7mp/stunner/blob/main/cmd/turncat/README.md Installs the turncat binary using the standard Go toolchain and adds it to the PATH. ```console go install github.com/l7mp/stunner/cmd/turncat@latest ``` -------------------------------- ### Install STUNner on Kubernetes Source: https://github.com/l7mp/stunner/blob/main/docs/examples/benchmark/README.md Commands to apply STUNner configurations for performance benchmarking on Kubernetes. ```bash kubectl apply -f iperf-server.yaml kubectl apply -f performance-stunner.yaml ``` -------------------------------- ### Official UDPRoute Example (for comparison) Source: https://github.com/l7mp/stunner/blob/main/docs/GATEWAY.md This example shows how to use the official UDPRoute resource, which requires specifying an API version and adding an arbitrary port to the backend references. ```yaml apiVersion: gateway.networking.k8s.io/v1alpha2 kind: UDPRoute metadata: name: media-plane-route namespace: stunner spec: parentRefs: - name: udp-gateway rules: - backendRefs: - name: media-server-pool namespace: media-plane port: 1 ``` -------------------------------- ### Install development version of STUNner Source: https://github.com/l7mp/stunner/blob/main/docs/INSTALL.md Helm command to install the development version of STUNner from the 'dev' release channel. ```bash helm install stunner stunner/stunner-dev --create-namespace --namespace=stunner-system ``` -------------------------------- ### Install stunnerctl with specific OS, architecture, and version Source: https://github.com/l7mp/stunner/blob/main/cmd/stunnerctl/README.md Enforces a specific OS, CPU architecture, and STUNner version during installation. ```console GOOS=windows GOARCH=amd64 go install github.com/l7mp/stunner/cmd/stunnerctl@v0.17.5 ``` -------------------------------- ### Performance measuring with Kubernetes example Source: https://github.com/l7mp/stunner/blob/main/docs/examples/benchmark/README.md Command to execute a performance benchmark within a Kubernetes cluster using the helper script. ```bash ./benchmark.sh -n 5 -t 5 -s 1000 -b 100000000 -p k8s ``` -------------------------------- ### Install icetester using Go toolchain Source: https://github.com/l7mp/stunner/blob/main/cmd/icetester/README.md Installs the icetester binary using the standard Go toolchain and adds it to the system's PATH. ```console go install github.com/l7mp/stunner/cmd/icetester@latest ``` -------------------------------- ### Apply CloudRetro setup configurations Source: https://github.com/l7mp/stunner/blob/main/docs/examples/cloudretro/README.md These commands apply the Kubernetes configurations for the CloudRetro coordinator and workers. ```console kubectl apply -f cloudretro-setup-coordinator.yaml kubectl apply -f cloudretro-setup-workers.yaml ``` -------------------------------- ### LiveKit Configuration with STUNner Source: https://github.com/l7mp/stunner/blob/main/docs/examples/livekit/README.md Example of the relevant part of the LiveKit configuration showing STUNner as the STUN/TURN server. ```yaml ... rtc: ... turn_servers: - host: 1.2.3.4 username: user-1 credential: pass-1 protocol: udp port: 3478 ``` -------------------------------- ### Example ICE Configuration with Ephemeral Credentials Source: https://github.com/l7mp/stunner/blob/main/docs/examples/kurento-one2one-call/README.md An example of the ICE configuration received by a browser client, showing ephemeral STUN/TURN credentials. ```json { "iceServers": [ { "urls": ["turn:34.118.112.176:3478?transport=udp"], "username": "1704390545:user", "credential": "br34ws29f1XAQqvMOthRHu0IglM=" } ], "iceTransportPolicy": "relay" } ``` -------------------------------- ### Get iperf server logs Source: https://github.com/l7mp/stunner/blob/main/docs/examples/simple-tunnel/README.md This command retrieves the logs from the iperf-server pod to view the benchmark results. ```console kubectl logs $(kubectl get pods -l app=iperf-server -o jsonpath='{.items[0].metadata.name}') ``` -------------------------------- ### Install turncat using curl Source: https://github.com/l7mp/stunner/blob/main/docs/cmd/turncat.md On Linux and macOS, use this script to download the latest version of the `turncat` binary. ```bash curl -sL https://raw.githubusercontent.com/l7mp/stunner/main/cmd/getstunner/getstunner.sh | sh - export PATH=$HOME/.l7mp/bin:$PATH ``` -------------------------------- ### Deploy STUNner Source: https://github.com/l7mp/stunner/blob/main/docs/examples/kurento-one2one-call/README.md Command to apply the STUNner configuration to Kubernetes. ```console kubectl apply -f docs/examples/kurento-one2one-call/kurento-one2one-call-stunner.yaml ``` -------------------------------- ### Debugging Gateway Operator Logs for License Issues Source: https://github.com/l7mp/stunner/blob/main/docs/PREMIUM_INSTALL.md This command retrieves logs from the STUNner gateway operator pod, which can help debug license validation problems. The output shows example log lines indicating license manager client creation and new license status. ```bash kubectl -n stunner-system logs $(kubectl -n stunner-system get pods -l \ control-plane=stunner-gateway-operator-controller-manager -o jsonpath='{.items[0].metadata.name}') ... license-mgr license manager client created {"server": "https://license.l7mp.io:443", "customer-key-status": "set"} ... license-mgr new license status {"subscription-type": "enterprise", "enabled-features": ["DaemonSet", "UserQuota", "STUNServer", "TURNOffload"], "last-updated": "..."} ... ``` -------------------------------- ### Deploy Application Server Source: https://github.com/l7mp/stunner/blob/main/docs/examples/direct-one2one-call/README.md Command to deploy the application server container using kubectl. ```bash kubectl apply -f docs/examples/direct-one2one-call/direct-one2one-call-server.yaml ``` -------------------------------- ### Edit the customer key Secret Source: https://github.com/l7mp/stunner/blob/main/docs/PREMIUM_INSTALL.md Command to manually edit the 'stunner-gateway-operator-customer-secret' using nano editor. ```console EDITOR=nano kubectl -n stunner-system edit secret stunner-gateway-operator-customer-secret ``` -------------------------------- ### Query STUNner auth service for ICE config Source: https://github.com/l7mp/stunner/blob/main/docs/AUTH.md Example query to the STUNner auth service to get a valid ICE configuration for TURN. ```console curl "http://stunner-auth.stunner-system:8088/ice?service=turn" { "iceServers": [ { "username": "1681486023:" "credential": "v+MZOBeGWnk2690oJVL0qwF8YHQ=", "urls": [ "turn:10.98.80.250:3478?transport=udp", "turn:10.105.169.152:3478?transport=tcp" ], } ], "iceTransportPolicy": "all" } ``` -------------------------------- ### Apply STUNner Configuration Source: https://github.com/l7mp/stunner/blob/main/docs/examples/direct-one2one-call/README.md Command to apply the STUNner configuration YAML file to Kubernetes. ```console kubectl apply -f docs/examples/direct-one2one-call/direct-one2one-call-stunner.yaml ``` -------------------------------- ### Default Dataplane Configuration Source: https://github.com/l7mp/stunner/blob/main/docs/GATEWAY.md An example of the default Dataplane resource installed by STUNner, used for provisioning stunnerd dataplane pods. ```yaml apiVersion: stunner.l7mp.io/v1 kind: Dataplane metadata: name: default spec: command: - stunnerd args: - -w - --udp-thread-num=16 image: l7mp/stunnerd:latest resources: limits: cpu: 2 memory: 512Mi requests: cpu: 500m memory: 128Mi terminationGracePeriodSeconds: 3600 ``` -------------------------------- ### Patch the customer key Secret Source: https://github.com/l7mp/stunner/blob/main/docs/PREMIUM_INSTALL.md Command to patch the 'stunner-gateway-operator-customer-secret' with the customer key using JSON merge patch. ```console kubectl -n stunner-system patch secret stunner-gateway-operator-customer-secret --type='json' \ -p='[{"op": "add" ,"path": "/stringData" ,"value": {}}, {"op": "replace" ,"path": "/stringData/CUSTOMER_KEY" ,"value": ""}]' ``` -------------------------------- ### Restart the STUNner operator deployment Source: https://github.com/l7mp/stunner/blob/main/docs/PREMIUM_INSTALL.md Command to restart the STUNner gateway operator deployment to apply the updated customer key. ```console kubectl -n stunner-system rollout restart deployment stunner-gateway-operator-controller-manager ``` -------------------------------- ### Create a Kubernetes Secret for the customer key Source: https://github.com/l7mp/stunner/blob/main/docs/PREMIUM_INSTALL.md Command to create a generic Kubernetes Secret named 'stunner-gateway-operator-customer-secret' in the 'stunner-system' namespace with the customer key. ```console kubectl -n stunner-system create secret generic stunner-gateway-operator-customer-secret --from-literal=CUSTOMER_KEY="" ``` -------------------------------- ### Docker Image Build and Push Source: https://github.com/l7mp/stunner/blob/main/docs/examples/elixir-webrtc/README.md Commands to build a Docker image and push it to a repository. ```bash export MYREPO=myrepo # use your own Docker repository name! sudo docker build -t $MYREPO/nexus . sudo docker push $MYREPO/nexus ``` -------------------------------- ### Stunnerd Command Line Execution with UDP Thread Scaling Source: https://github.com/l7mp/stunner/blob/main/cmd/stunnerd/README.md Example command to start stunnerd, watching a configuration file and utilizing 32 parallel UDP readloops for improved performance. ```sh ./stunnerd -w -c /etc/stunnerd/stunnerd.conf --udp-thread-num=32 ``` -------------------------------- ### Check STUNner Dataplane Pods License Status Source: https://github.com/l7mp/stunner/blob/main/docs/PREMIUM_INSTALL.md This command connects to each dataplane pod of a specified gateway and reports the running licensing status, including subscription tier and unlocked premium features. ```console stunnerctl -a status -o jsonpath='License status for dataplane node {.admin.Name}: {.admin.licensing_info}' {tier=enterprise,unlocked-features=[TURNOffload,UserQuota,DaemonSet,STUNServer,RelayAddressDiscovery],valid-until=...} ``` -------------------------------- ### Check STUNner Gateway Operator License Status Source: https://github.com/l7mp/stunner/blob/main/docs/PREMIUM_INSTALL.md This command connects to the STUNner gateway operator and reports the license status, including subscription type, enabled features, and last updated time. ```console stunnerctl license License status: Subscription type: member Enabled features: DaemonSet, STUNServer, ... Last updated: ... ``` -------------------------------- ### mediasoup-demo URL parameters for TURN server configuration Source: https://github.com/l7mp/stunner/blob/main/docs/examples/mediasoup/README.md This example demonstrates how to configure the TURN server using URL parameters in the mediasoup clients. ```javascript https://mediasoup-demo.example.com/?enableIceServer=yes&iceServerHost=100.100.100.100&iceServerPort=3478&iceServerProto=udp&iceServerUser=user-1&iceServerPass=pass-1 ``` -------------------------------- ### Check STUNner Resources Source: https://github.com/l7mp/stunner/blob/main/docs/examples/simple-tunnel/README.md This command checks for the installation of necessary STUNner resources like gateway configurations, gateways, and UDP routes within the 'stunner' namespace. ```console kubectl get gatewayconfigs,gateways,udproutes.stunner.l7mp.io -n stunner NAME REALM DATAPLANE AGE gatewayconfig.stunner.l7mp.io/stunner-gatewayconfig stunner.l7mp.io default 139m NAME CLASS ADDRESS PROGRAMMED AGE gateway.gateway.networking.k8s.io/tcp-gateway stunner-gatewayclass 35.187.97.94 True 139m gateway.gateway.networking.k8s.io/udp-gateway stunner-gatewayclass 35.205.10.190 True 139m NAME AGE udproute.stunner.l7mp.io/iperf-server 139m ``` -------------------------------- ### Run iperf client for UDP benchmark Source: https://github.com/l7mp/stunner/blob/main/docs/examples/simple-tunnel/README.md This command starts an iperf client to connect to STUNner via turncat and initiate the UDP benchmark. ```console iperf -c localhost -p 5000 -u -i 1 -l 100 -b 800000 -t 10 ``` -------------------------------- ### Install STUNner chart without CRDs Source: https://github.com/l7mp/stunner/blob/main/docs/INSTALL.md Helm command to install the STUNner chart while skipping the installation of Gateway API CRDs and STUNner CRDs. ```bash helm install stunner stunner/stunner --create-namespace --namespace=stunner-system --skip-crds ``` -------------------------------- ### Apply iperf server configuration Source: https://github.com/l7mp/stunner/blob/main/docs/examples/simple-tunnel/README.md Set up an iperf server in the default Kubernetes namespace and wrap it in a Kubernetes service called iperf-server. ```console cd stunner kubectl apply -f docs/examples/simple-tunnel/iperf-server.yaml ``` -------------------------------- ### Create mediasoup namespace and apply manifest Source: https://github.com/l7mp/stunner/blob/main/docs/examples/mediasoup/README.md Creates the 'mediasoup' namespace and applies the mediasoup-server.yaml manifest to Kubernetes. ```console kubectl create ns mediasoup kubectl apply -f docs/examples/mediasoup/mediasoup-server.yaml ``` -------------------------------- ### Current STUNner UDP Gateway Configuration Source: https://github.com/l7mp/stunner/blob/main/docs/examples/kurento-one2one-call/README.md Shows the initial STUNner UDP gateway configuration with static authentication. ```console bin/stunnerctl -n stunner config udp-gateway Gateway: stunner/udp-gateway (loglevel: "all:INFO") Authentication type: static, username/password: user-1/pass-1 ... ``` -------------------------------- ### Install Ingress controller Source: https://github.com/l7mp/stunner/blob/main/docs/examples/TLS.md Install an Ingress controller into your cluster. We used the official nginx ingress, but other Ingress implementations might work (check their documentation for install steps). ```console helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update helm install ingress-nginx ingress-nginx/ingress-nginx ``` -------------------------------- ### Install cert-manager Source: https://github.com/l7mp/stunner/blob/main/docs/examples/TLS.md Add the Helm repository, which contains the cert-manager Helm chart, and install the charts: ```console helm repo add jetstack https://charts.jetstack.io helm repo update helm install cert-manager jetstack/cert-manager --namespace cert-manager \ --create-namespace --set global.leaderElection.namespace=cert-manager \ --set crds.enabled=true --timeout 600s ``` -------------------------------- ### Scaling Kurento Media Server Source: https://github.com/l7mp/stunner/blob/main/docs/examples/kurento-magic-mirror/README.md Scales the Kurento media server pool to 4 instances. ```bash kubectl scale deployment kms --replicas=4 ``` -------------------------------- ### Build stunnerctl from source Source: https://github.com/l7mp/stunner/blob/main/cmd/stunnerctl/README.md Builds the stunnerctl binary from the source code using the Go build command. ```console cd stunner go build -o stunnerctl cmd/stunnerctl/main.go ``` -------------------------------- ### Local Measurement Output Example Source: https://github.com/l7mp/stunner/blob/main/docs/examples/benchmark/README.md Example output from a local STUNner benchmark measurement. ```text Number of concurrent turncat clients: 5 Evaluation time: 1 sec Packet size: 1000 bytes Bandwidth: 10000 Kbits/sec or 10 Mbits/sec per turncat client Platform: local Results [ ID] Interval Transfer Bandwidth Jitter Lost/Total Latency avg/min/max/stdev PPS NetPwr [ 4] 0.0000-0.9977 sec 1.19 MBytes 10.0 Mbits/sec 0.038 ms 3/1253 (0.24%) 0.061/0.020/3.622/0.161 ms 1253 pps 20465 [ 1] 0.0000-0.9992 sec 1.19 MBytes 10.0 Mbits/sec 0.049 ms 0/1253 (0%) 0.107/0.021/3.708/0.186 ms 1254 pps 11770 [ 3] 0.0000-0.9980 sec 1.19 MBytes 10.0 Mbits/sec 0.003 ms 0/1253 (0%) 0.040/0.023/2.927/0.145 ms 1256 pps 31217 [ 2] 0.0000-0.9989 sec 1.19 MBytes 10.0 Mbits/sec 0.042 ms 1/1253 (0.08%) 0.115/0.024/1.391/0.091 ms 1253 pps 10864 [ 5] 0.0000-0.9977 sec 1.19 MBytes 10.0 Mbits/sec 0.003 ms 1/1253 (0.08%) 0.036/0.023/1.818/0.097 ms 1255 pps 34840 [ ID] Interval Transfer Bandwidth Write/Err PPS [SUM] 0.0000-0.9985 sec 5.97 MBytes 50.2 Mbits/sec 5/6265 6269 pps ``` -------------------------------- ### Manually install CRDs Source: https://github.com/l7mp/stunner/blob/main/docs/INSTALL.md kubectl commands to manually apply the Gateway API CRDs and STUNner CRDs. ```bash kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.3.0/experimental-install.yaml kubectl apply -f https://raw.githubusercontent.com/l7mp/stunner-helm/refs/heads/main/helm/stunner/crds/stunner-crd.yaml ``` -------------------------------- ### UDPRoute Example Source: https://github.com/l7mp/stunner/blob/main/docs/SECURITY.md This UDPRoute example demonstrates how to restrict access to a specific service, in this case, the 'media-server' in the 'media-plane' namespace. ```yaml apiVersion: stunner.l7mp.io/v1 kind: UDPRoute metadata: name: stunner-udproute namespace: stunner spec: parentRefs: - name: udp-gateway rules: - backendRefs: - name: media-server namespace: media-plane ``` -------------------------------- ### Install stunner-gateway-operator with Prometheus support Source: https://github.com/l7mp/stunner/blob/main/docs/MONITORING.md This command installs the STUNner gateway operator with Prometheus metrics endpoint enabled. ```console helm install stunner stunner/stunner --create-namespace --namespace=stunner-system --set stunnerGatewayOperator.dataplane.spec.enableMetricsEndpoint=true ``` -------------------------------- ### Apply Kubernetes Deployment Source: https://github.com/l7mp/stunner/blob/main/docs/examples/elixir-webrtc/README.md Command to apply the Nexus server deployment to Kubernetes. ```bash kubectl apply -f docs/examples/elixir-webrtc/nexus-server.yaml ``` -------------------------------- ### GatewayConfig Example Source: https://github.com/l7mp/stunner/blob/main/docs/GATEWAY.md An example of a GatewayConfig resource, demonstrating how to specify authentication credentials, realm, and dataplane log level. ```yaml apiVersion: stunner.l7mp.io/v1 kind: GatewayConfig metadata: name: stunner-gatewayconfig namespace: stunner spec: logLevel: "all:DEBUG,turn:INFO" realm: stunner.l7mp.io authRef: name: stunner-auth-secret namespace: stunner ``` -------------------------------- ### UDPRoute Configuration Source: https://github.com/l7mp/stunner/blob/main/docs/examples/direct-one2one-call/README.md Kubernetes UDPRoute resource configuration for STUNner headless mode. ```yaml apiVersion: stunner.l7mp.io/v1 kind: UDPRoute metadata: name: stunner-headless namespace: stunner spec: parentRefs: - name: udp-gateway - name: tcp-gateway rules: - backendRefs: - name: udp-gateway namespace: stunner - name: tcp-gateway namespace: stunner ``` -------------------------------- ### Build from source Source: https://github.com/l7mp/stunner/blob/main/cmd/turncat/README.md Builds the turncat binary from source using the Go toolchain. ```console cd stunner go build -o turncat cmd/turncat/main.go ```