Janus in Google Kubernetes

I am facing issues while using Janus in the Google K8 container. I can connect to Janus over the domain name https://my-domain:3000/janus. But when I start video recording, ICE fails on both ends.

The structure is

Internet <—> Nginx Load Balancer <—Port 3000 forawrd—> Janus Gateway Container

janus.jcfg

interface = “0.0.0.0”

media: {
#ipv6 = true
#ipv6_linklocal = true
min_nack_queue = 500
rtp_port_range = “20000-40000”
#dtls_mtu = 1200
#no_media_timer = 1
slowlink_threshold = 5
}

nat: {
stun_server = “stun.l.google.com
stun_port = 19302
nice_debug = false
full_trickle = true
#ice_nomination = “regular”
ice_keepalive_conncheck = true
nat_1_1_mapping = “janus-service-cluster-ip”
keep_private_host = true
}

There is no official documentation confirming that Janus supports Kubernetes. So Assuming that Janus is not scalable in K8.

Janus works wherever you put it, but as all WebRTC services, it needs support for a dynamic range of ports to be exposed in order to be able to publicly reachable without NATting. You’re just mapping the signalling port, which is very likely not enough. I know very little about k8s myself, but I think using host mode should make that range of UDP ports possible.

I have already deployed Janus on multiple Google cloud instances independently where it is working fine. Dynamic large Range of port(say 20000-40000) mapping is not as per the ideology of Kubernetes. For Janus deployment, Do u have any example in Kubernetes deployment where it is working?

As I said already, I don’t know much about k8s and Janus, but many of our customers use them together successfully so it’s doable.

ok, Let me try with large ports set mapped directly to containers running Janus. However, opening too many UDP ports is against the principle of containerization of applications. if you guys have time can you officially investigate and document the scalability of Janus in Kubernetes?