how to self-host livekit server in Azure kubernets...
# ask-ai
m
how to self-host livekit server in Azure kubernets cluster
t
Thanks for reaching out, Rajadurai. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To self-host a LiveKit server in an Azure Kubernetes Service (AKS) cluster, here’s a friendly step-by-step guide to help you through the process: 1. Use the LiveKit Helm Chart: First, add the LiveKit Helm repository and update it with these commands:
Copy code
helm repo add livekit https://livekit.io/charts
helm repo update
2. Configure
values.yaml
for AKS:
You’ll want to customize this file to enable host networking, set termination grace periods, and configure RTC and TURN services. Here’s an example to get you started:
Copy code
podHostNetwork: true
terminationGracePeriodSeconds: 18000
livekit:
  rtc:
    use_external_ip: true
    port_range_start: 50000
    port_range_end: 60000
    tcp_port: 7881
  turn:
    enabled: true
    domain: turn.yourdomain.com
    tls_port: 3478
    udp_port: 3478
    secretName: turn-tls-secret
3. Set Up Ingress and Load Balancer: To manage traffic smoothly, use the NGINX Ingress Controller. You can install it via Helm with these commands:
Copy code
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install ingress-nginx ingress-nginx/ingress-nginx --set controller.publishService.enabled=true
4. Configure SSL/TLS Certificates: It’s important to secure your setup by importing your SSL certificate as a Kubernetes secret:
kubectl create secret tls turn-tls-secret --key key.pem --cert cert.pem
5. Deploy LiveKit Server: When you’re ready, install LiveKit using Helm with your customized
values.yaml
file:
helm install livekit-server livekit/livekit-server -f values.yaml
6. Verify Network and Security Settings: Make sure your AKS nodes allow inbound UDP traffic on RTC port ranges (like 50000–60000) and TURN ports (3478). You can configure this using Azure Network Security Groups (NSGs). 7. Autoscaling: To help your server handle varying loads smoothly, consider enabling autoscaling in your
values.yaml
. If any of these steps feel tricky or if you’d like me to walk you through any part in more detail, please don’t hesitate to ask. I’m here to help you get this set up just right! Sources: livekit-server/values.yaml | docs/tutorials/azure-private-dns.md | Deploy to Kubernetes | LiveKit Docs