Is it k3s viable option for livekit deployment?
# ask-ai
s
Is it k3s viable option for livekit deployment?
t
Thanks for reaching out, Nouman. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
k3s is a viable option for deploying LiveKit, as it is a lightweight Kubernetes distribution that supports the standard Kubernetes APIs and features required by LiveKit. Key considerations for deploying LiveKit on k3s: • Host Networking: LiveKit pods require direct host network access. Only one LiveKit pod can run per node due to port requirements. • Cluster Type: Avoid serverless or private clusters, as additional NAT layers interfere with WebRTC traffic. • Resource Allocation: Allocate sufficient resources to each node, since each will run a single LiveKit pod. • Graceful Termination: Set
terminationGracePeriodSeconds
to 5 hours in your Helm chart to allow pods to shut down gracefully. • Firewall: Ensure your firewall allows traffic to the required LiveKit ports. The official Helm chart can be used as a guide for your k3s deployment. Example Kubernetes manifests are available and can be adapted for k3s clusters. As long as your k3s cluster is not behind additional NAT layers and meets the above requirements, it is suitable for LiveKit deployment. Sources: Deploy to Kubernetes | LiveKit Docs | livekit-server/values.yaml | kubernetes/README.md
s
Need docs for livekit deployment on hetzner.
t
Hey there! While LiveKit doesn't have a Hetzner-specific deployment guide, don't worry – the standard VM deployment method with Docker Compose and Caddy works like a charm on Hetzner servers. Deployment steps for Hetzner: 1. First things first, set up a Hetzner server (cloud or dedicated) with a public IP address. 2. Make sure you've got a domain name and can add DNS records for your subdomains. 3. Let's configure your Hetzner firewall – you'll need to open these ports: ◦ 443 (HTTPS and TURN/TLS) ◦ 80 (TLS issuance) ◦ 7881 (WebRTC over TCP) ◦ 3478/UDP (TURN/UDP) ◦ 50000-60000/UDP (WebRTC over UDP) 1. Time to generate your deployment files! Use the LiveKit configuration tool: `docker pull livekit/generate docker run --rm -it -v$PWD:/output livekit/generate`This will create
caddy.yaml
,
docker-compose.yaml
,
livekit.yaml
, and some helpful deployment scripts. 2. Deploy using Docker Compose and Caddy as outlined in the generated files. 3. Pro tip: For automated setup, you can use the generated
cloud-init
file in Hetzner's "User data" field when creating a new cloud instance. If you're planning a production environment, I recommend using compute-optimized instances, 10Gbps ethernet or faster, and host networking to get the best performance. These steps follow the official deployment recommendations and are totally compatible with Hetzner's infrastructure. You've got this! Sources: Deploying LiveKit | LiveKit Docs | Deploying LiveKit | LiveKit Docs | deploy/README.md | Voice Assistants | livekit/livekit_composite | DeepWiki | Deploy to a VM | LiveKit Docs
s
All this setup is on k3s in hetzner
t
Hey there! While Hetzner doesn't have specific LiveKit documentation for k3s, don't worry - you can totally deploy LiveKit using the standard Kubernetes process with the official Helm chart. It'll work smoothly on your Hetzner infrastructure! Here's a friendly walkthrough of the key steps: 1. First up, get your k3s cluster set up on Hetzner and make sure each node has a public IP. 2. Let's open those important ports on your Hetzner firewall: ◦ 443 (HTTPS and TURN/TLS) ◦ 80 (TLS issuance) ◦ 7881 (WebRTC over TCP) ◦ 3478/UDP (TURN/UDP) ◦ 50000-60000/UDP (WebRTC over UDP) 1. Install Helm on your management machine - it's super easy! 2. Create a
values.yaml
file using the sample template as your guide. 3. Import your SSL certificates as Kubernetes secrets:
kubectl create secret tls <name> --cert <cert-file> --key <key-file> --namespace <namespace>
4. Time to install LiveKit using Helm with your custom configuration and namespace. 5. Pro tip: Make sure host networking is on for LiveKit pods. Remember, only one LiveKit pod can run per node because of port requirements. 6. Set
terminationGracePeriodSeconds
to 5 hours in your Helm chart for smooth, graceful shutdowns. These steps follow the official deployment recommendations and work great for k3s clusters on Hetzner. No special Hetzner limitations to worry about - just make sure your cluster isn't behind extra NAT layers and all those ports are open and ready to go! Sources: Deploy to Kubernetes | LiveKit Docs | server-sample.yaml | Deploying to production | LiveKit Docs | kubernetes/README.md | Kubernetes &amp; Helm Charts | livekit/livekit_composite | DeepWiki