Hi Team, we have deployed livkit in eks cluster, w...
# ask-ai
b
Hi Team, we have deployed livkit in eks cluster, worker nodes deployed in public subnet of VPC, my participent able to join the call, they are not able to hear and each other video. Find below livekit-server value.yaml file.
Copy code
replicaCount: 1

terminationGracePeriodSeconds: 18000

livekit:
  port: 7880
  # Uncomment to enable prometheus metrics
  # prometheus_port: 6789
  log_level: info
  rtc:
    use_external_ip: true
    allow_tcp_fallback: true
    # default ports used
    port_range_start: 50000
    port_range_end: 60000
    tcp_port: 7881
  redis:
    address: redis-service:6379
  # one or more API key/secret pairs
  # see https://docs.livekit.io/guides/getting-started/#generate-api-key-and-secret
  keys:
    key: "Value"
  turn:
    loadBalancerAnnotations:
      service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
      service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-1:111111111:certificate/adsafsdfsdfdasfas76"
      service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "turn-tls"
    enabled: true

    domain: turneks.testmind.com

    tls_port: 3478
    udp_port: 443

    external_tls: true
    # Kubernetes Secret containing TLS cert for turn.myhost.com
    # See https://docs.livekit.io/deploy/kubernetes/#importing-ssl-certificates
    #secretName: livekit-turn-tls
    # set the Kubernetes serviceType for the TURN service. By default it sets it to "LoadBalancer"
    # See kubernetes serviceTypes on official documentation: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
    serviceType: "LoadBalancer"

loadBalancer:
  type: alb
  # staticIpName: nameofIpAddressCreated
  # certificateName: nameOfCert
  # clusterIssuer: letsencrypt-prod
  tls:
    - hosts:
      - livekiteks.testmind.com

# autoscaling requires resources to be defined
autoscaling:
  enabled: true
  minReplicas: 1
  maxReplicas: 5
  targetCPUUtilizationPercentage: 60

nodeSelector:
  {}
  # node.kubernetes.io/instance-type: c5.2xlarge

resources:
  limits:
    cpu: 1000m
    memory: 2048Mi
  requests:
    cpu: 500m
    memory: 1024Mi

readinessProbe:
  httpGet:
    path: /
    port: 7880
  initialDelaySeconds: 30
  timeoutSeconds: 5
  periodSeconds: 10
  failureThreshold: 3
t
Thanks for reaching out, Chetan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm here to help you with the issue where participants can't hear or see each other in your LiveKit deployment on EKS. Let's walk through some important areas together to get this sorted out: • TURN Server Configuration: Please make sure TURN is enabled with a valid domain and the right TLS certificates. Remember, the TURN server needs its own SSL certificate, separate from your main domain's certificate. • Network and Cluster Configuration: Check that your EKS cluster isn’t private, as private clusters aren’t supported. Also, ensure LiveKit pods have direct access to the necessary UDP/TCP ports and that there’s only one LiveKit pod running per node. • Load Balancer: Verify that the AWS Load Balancer Controller is installed and that the ALB is set up correctly. • Firewall Rules: It’s important to confirm that firewalls allow RTC traffic on the required ports (like 50000-60000 for UDP and 7881 for TCP). • Certificate Validation: Double-check that both your primary domain and TURN domain have valid SSL certificates. To help us dig deeper and assist you better, could you please share a few details? • The LiveKit server version and client SDK versions you’re using. • Room IDs and timestamps when the issue happened. • Any recent changes you made to your deployment or configuration. • Logs from both the LiveKit server and client side, including any browser console errors. Once we have this information, we’ll be in a great position to support you further and get everything running smoothly. Thanks for your patience—we’re here to help! Sources: Deploy to Kubernetes | LiveKit docs | How to Enable Agent-to-Agent Speech Detection in LiveKit | Understanding "silence detected on local audio track" warning | CHANGELOG.md | Still Have Questions
b
• TURN Server Configuration: Please make sure TURN is enabled with a valid domain and the right TLS certificates. Remember, the TURN server needs its own SSL certificate, separate from your main domain's certificate. ◦ attached separate certificate for both • Network and Cluster Configuration: Check that your EKS cluster isn’t private, as private clusters aren’t supported. Also, ensure LiveKit pods have direct access to the necessary UDP/TCP ports and that there’s only one LiveKit pod running per node. ◦ EKS cluster is in public ◦ worker node deployed in public subnet ◦ SG allowed 50000-60000 for UDP and 7881 for TCP • Load Balancer: Verify that the AWS Load Balancer Controller is installed and that the ALB is set up correctly. ◦ Correctly configure, able to create livkit and trun load balancer. • Firewall Rules: It’s important to confirm that firewalls allow RTC traffic on the required ports (like 50000-60000 for UDP and 7881 for TCP). ◦ Open at worker node SG level ◦ Do we need to open same on load balancer SG as well? • Certificate Validation: Double-check that both your primary domain and TURN domain have valid SSL certificates. ◦ Verified separate certificate for both livekit server and turn
t
I’m glad you asked! To make sure everything runs smoothly, you’ll want to open the necessary ports on both your worker node and load balancer security groups. Here’s a friendly breakdown to guide you: • Worker Node Security Group: Please check that the following ports are open: ◦ UDP: 50000-60000 (or the range you’ve set in
rtc.port_range_start
and
rtc.port_range_end
) ◦ TCP: 7881 (or the port you’ve defined in
rtc.tcp_port
) ◦ TURN/UDP: 3478 (or the port set in `turn.udp_port`; using 443 is recommended for smoother firewall traversal) • Load Balancer Security Group: Make sure these ports are open: ◦ HTTPS: 443 (this handles API/WebSocket traffic and TURN/TLS if your load balancer is in use) ◦ HTTP: 80 (only if you’re using HTTP to HTTPS redirection) Also, double-check that your load balancer is correctly routing traffic to the right backend ports, like 7880 for API/WebSocket and TURN/TLS if that applies. If you’d like, I’m here to help you with setting up these rules or if anything feels unclear—just let me know! Sources: docs/tutorials/aws-load-balancer-controller.md | Deploy to Kubernetes | LiveKit docs | Ports and firewall | LiveKit docs | livekit-server/templates/service.yaml | config-sample.yaml
b
traffic workflow
Client -> ALB:443 -> Node:32681 -> Pod:7880
Please help me with setting up these rules
t
Let's walk through how to configure the security group rules for your traffic workflow (
Client → ALB:443 → Node:32681 → Pod:7880
) together. Here’s a step-by-step guide: • ALB Security Group: ◦ Inbound: Please allow TCP traffic on port 443 from
0.0.0.0/0
(this means from the internet). ◦ Outbound: Allow TCP traffic to the target nodes on port 32681. • Node Security Group: ◦ Inbound: ▪︎ Allow TCP traffic on port 32681 from the ALB's security group specifically (not from
0.0.0.0/0
), to keep things secure. ▪︎ Allow UDP traffic on ports 50000-60000 (or the range defined in
rtc.port_range_start
and
rtc.port_range_end
) from
0.0.0.0/0
for WebRTC media — this is essential for smooth real-time communication. ▪︎ Allow TCP traffic on port 7881 (or the port defined in
rtc.tcp_port
) from
0.0.0.0/0
to support WebRTC TCP fallback. ▪︎ Allow UDP traffic on port 3478 (or the port defined in
turn.udp_port
, recommended to use 443) from
0.0.0.0/0
for TURN/UDP functionality. ▪︎ Allow TCP traffic on port 5349 (or the port defined in
turn.tls_port
) from
0.0.0.0/0
for TURN/TLS, especially if you’re not using ALB for TLS termination. Just a few additional notes to keep in mind: • Make sure your ALB is properly routing traffic to port 32681 on the nodes, which corresponds to port 7880 on the LiveKit pods. • For production environments, it’s best practice to use TLS termination at the ALB level and avoid exposing port 7880 directly to the internet for better security. • Remember, WebRTC media ports (50000-60000 UDP) need to be open on the nodes because they bypass the ALB to enable real-time communication. If you have any questions or need a hand implementing these rules, please don’t hesitate to reach out. I’m here to help! Sources: Deploy to Kubernetes | LiveKit docs | ingress-sample.yaml | config-sample.yaml | Ports and firewall | LiveKit docs
b
My current status : We are seeking support for our LiveKit on EKS deployment. Participants can successfully join a room and share messages on chat, but they cannot see or hear each other. We would appreciate your expert review of our setup and configuration • Environment Summary ◦ Provider: AWS EKS ◦ Networking: EKS worker nodes are in public subnets within a custom VPC. ◦ Ingress: AWS Load Balancer Controller is installed and functional. ◦ LiveKit Version:
livekit-server-1.9.0
(from official Helm chart). • Deployment Topology ◦ Signaling ( Handled by an AWS ALB created via Kubernetes Ingress. This is working correctly. ◦ TURN ( Handled by an AWS NLB created via a
Service
of type
LoadBalancer
. ◦ TLS: Valid ACM certificates are attached to both load balancers via annotations. • Problem Description • What Works: ▪︎ Multiple participants can successfully connect and appear in the participant list. ◦ Server logs confirm
starting RTC session
and
mediaTrack published
, indicating the server is receiving the initial connection and client media streams. • What Fails: ▪︎ No audio or video is transmitted between participants (black screens, no sound). ◦ This indicates a failure in the media subscription path from the server back to the clients. • Key Error Log • The server logs consistently show this warning for all participants, confirming the subscription failure: • code • Code ◦ WARN livekit.sub rtc/subscriptionmanager.go:449 track not bound after timeout • Troubleshooting Steps Completed • Worker Node Security Group: We have added inbound rules from
0.0.0.0/0
for: ▪︎ UDP
50000-60000
(WebRTC) ▪︎ TCP
7881
(WebRTC Fallback) ◦ Required TCP & UDP ports for our TURN configuration. ◦ Load Balancers: Verified that ALB target groups are healthy and the NLB is provisioned. • Our Question ◦ Despite correct firewall rules (we believe), the media plane is failing. Could you please review our attached
values.yaml
for any misconfigurations that could cause this one-way media issue? livekit-server values.yaml
Copy code
replicaCount: 1

terminationGracePeriodSeconds: 18000

livekit:
  port: 7880
  # Uncomment to enable prometheus metrics
  # prometheus_port: 6789
  log_level: info
  rtc:
    use_external_ip: true
    allow_tcp_fallback: true
    # default ports used
    port_range_start: 50000
    port_range_end: 60000
    tcp_port: 7881
  redis:
    address: redis-service:6379
  keys:
    <key>: "<secret>"
  turn:
    loadBalancerAnnotations:
      service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
      service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "<ACM_ARN>"
      service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "turn-tls"
    enabled: true
    domain: turn.<domain>.com
    external_tls: true
    tls_port: 3478
    udp_port: 443
    serviceType: "LoadBalancer"

loadBalancer:
  type: alb
  annotations:
    alb.ingress.kubernetes.io/certificate-arn: "<ACM_ARN>"
    alb.ingress.kubernetes.io/scheme: "internet-facing"
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
    alb.ingress.kubernetes.io/ssl-redirect: "443"

  tls:
    - hosts:
      - livekit.<domain>.com

autoscaling:
  enabled: true
  minReplicas: 1
  maxReplicas: 5
  targetCPUUtilizationPercentage: 60

nodeSelector:
  {}

resources:
  limits:
    cpu: 1000m
    memory: 2048Mi
  requests:
    cpu: 500m
    memory: 1024Mi

readinessProbe:
  httpGet:
    path: /
    port: 7880
  initialDelaySeconds: 30
  timeoutSeconds: 5
  periodSeconds: 10
  failureThreshold: 3
Browser console error :
Copy code
livekit.test.com/settings:1  Failed to load resource: the server responded with a status of 404 ()Understand this error
index.js:20641 Uncaught (in promise) Error: Could not authenticate. Server responded with status 404: 
    at EZ.j (index.js:20641:1)
    at async EZ.setEnabled (index.js:20620:1)
    at async Ev.setEnabled (index.js:20722:1)Understand this error
livekit.test.com/settings:1  Failed to load resource: the server responded with a status of 404 ()Understand this error
intercept-console-error.ts:41 Krisp hook: error enabling filter Error: Could not authenticate. Server responded with status 404: 
    at EZ.j (index.js:20641:1)
    at async EZ.setEnabled (index.js:20620:1)
    at async Ev.setEnabled (index.js:20722:1)
t
I'm sorry to hear that participants are having trouble seeing or hearing each other, and I understand how frustrating that can be. The warning "track not bound after timeout" usually points to an issue with the media track publication or subscription process. Based on what you've shared and your setup, here are some important areas to check that might help resolve this: • Host Networking: Please make sure your LiveKit pods are set up with
hostNetwork: true
. This setting is really important for smooth WebRTC performance, especially in Kubernetes environments like EKS. • TURN/STUN Configuration: Double-check that your TURN server is properly configured and accessible. It's also good to verify that your TURN domain and certificates are valid, and that the necessary ports (like 3478 for UDP and 443 for TLS) are open and reachable. • Codec Support: Take a look at the codecs your clients are using. If any client is using an unsupported or invalid codec, it could prevent media tracks from binding correctly. • Resource Allocation: Keep an eye on CPU and memory usage on your EKS nodes. LiveKit can be resource-heavy, and if there aren’t enough resources, timeouts might happen. Using compute-optimized instance types in production can really help. • Security Groups: It’s important to confirm that your AWS security groups allow the necessary WebRTC port ranges (50000-60000 for UDP, 7881 for TCP fallback) as well as TURN ports. • Permissions: Lastly, check that participants have the right permissions to publish and subscribe to media tracks. Sometimes, incorrect permission settings can block media flow. Also, it’s a good idea to monitor your network performance to ensure it meets the recommended 10Gbps Ethernet or faster for LiveKit deployments. Please feel free to reach out if you’d like help going through any of these steps or if you need more detailed guidance on your setup—I’m here to help! Sources: errors.go | CHANGELOG.md | Deploying LiveKit | LiveKit docs | Troubleshooting Guide | livekit/livekit_composite | DeepWiki | Worker options | LiveKit Docs