A Kubernetes Operator for managing the lifecycle of LiveKit media servers.
Unlike standard operators built with Kubebuilder, this project utilizes the Delta-Controller framework, allowing for a purely declarative, pipeline-based architecture. It solves the complex "Day-1" and "Day-2" operational challenges of WebRTC infrastructure—specifically Network Discovery (NAT/TURN), state management, and multi-tenancy—without imperative spaghetti code.
- Zero-Touch Provisioning: Automatically discovers public IPs from Cloud LoadBalancers and hydrates the LiveKit configuration. No manual
turn_serverssetup required. - Gateway API Integration: Native support for Stunner and Envoy Gateway to handle UDP/TCP traffic separation.
- Polymorphic Persistence: Seamlessly switch between embedded Redis (StatefulSet) and external Cloud Redis (Memorystore/Elasticache) with zero downtime.
- Feature Toggling: Enable/Disable components like Ingress via simple CRD flags; the operator handles the cleanup.
- Secure by Default: Automated TLS certificate generation via cert-manager and secure credential management.
- Kubernetes cluster (GKE, EKS, or Kind)
- Delta-Controller installed.
- Stunner Gateway Operator installed.
- Envoy Gateway installed.
- Cert-Manager installed.
- Domain with access to DNS
This operator implements the \Delta-Controller Pattern, treating the Kubernetes reconciliation loop as a dataflow problem rather than a procedural one.
Instead of if/else logic, the state is derived through SQL-like transformations:
- Decomposition:
LiveKitPool->LiveKitServerView+LiveKitNetworkingView - Network Discovery:
NetworkingView+Gateway (K8s)->Resolved Public IP - Materialization:
Views->Deployments,Services,Secrets
This architecture ensures that the "Inverse Operation" (Teardown/Garbage Collection) is handled automatically. If a resource disappears from the View, it is deleted from the cluster.
This project is licensed under the MIT License - see the LICENSE file for details.
This project was developed as part of a BSc Thesis at Budapest University of Technology and Economics (BME), Department of Telecommunications and Media Informatics.
Author: Sándor Lukácsi