I am getting this error in livekit on self deploym...
# ask-ai
p
I am getting this error in livekit on self deployment kubernetes : livekit rtcconfig/webrtc_config.go:262 failed to get external ip {"local": "<IP>", "err": "context canceled"} 2025-08-11T025616.959Z INFO livekit rtcconfig/webrtc_config.go:262 failed to get external ip {"local": "<IP>", "err": "context canceled"} 2025-08-11T025616.959Z INFO livekit rtcconfig/webrtc_config.go:262 failed to get external ip {"local": "<IP>", "err": "context canceled"} I noticed that in here https://docs.livekit.io/home/self-hosting/kubernetes/ it says: LiveKit does not support deployment to serverless and/or private clusters. Private clusters have additional layers of NAT that make it unsuitable for WebRTC traffic. I am using Google GKE, how can I fix this issue?
t
Thanks for reaching out, Yasser. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! If you’re running into the "failed to get external IP" error with your LiveKit deployment on Google GKE, no worries—let’s walk through some steps to get it sorted out: 1. RTCM Configuration: Double-check that
use_external_ip: true
is set in your LiveKit config. This helps LiveKit find the external IP using STUN, which is super important in cloud setups. 2. Load Balancer Configuration: Make sure you’re using a GKE-friendly load balancer in your Helm chart. If you’re on a VPC-native GKE cluster, set the load balancer type to
gke-vpc-native
. 3. Network Requirements: Verify that the necessary ports are open—this includes
tcp_port
(default 7881),
udp_port
(default 3478) for TURN, and the RTP/RTCP port range (50000-60000). Also, check that GKE’s firewall rules allow traffic on these ports. 4. STUN Servers: LiveKit relies on STUN servers to find your external IP. Make sure your deployment can reach the default STUN servers, or you can specify your own custom STUN servers if needed. 5. Verify Service Exposure: Take a look at your Kubernetes service setup to ensure LiveKit is exposed properly. You can check the service status with: `kubectl get svc -n <namespace>`If you’re using an Ingress, confirm it’s routing traffic correctly to LiveKit. 6. Check Logs: Still stuck? Peek at the LiveKit logs to get more clues about what’s going on with the external IP lookup:
kubectl logs <livekit-pod-name> -n <namespace>
Give these a try, and you should be back on track in no time. If you hit any bumps or want me to walk through anything else, just let me know—I’m here to help! Sources: Deploying LiveKit | LiveKit Docs | gclb-sample.yaml | Deploy to Kubernetes | LiveKit Docs | pkg/rtcconfig/ip.go | Self-hosting the Ingress Service | LiveKit Docs