I am trying to deploy coturn
server in the Kubernetes
cluster.
According to the startup manual, it seems to each server has to have own external IP address. But I can't find a way to bind external IP addresses to each coturn pod
s.
How can I solve this problem? Or should I place server outside of Kubernetes cluster?
The simplest way for this would be to use a DaemonSet with hostNetwork: true. That way you will have a coturn server for each of the node servers with direct access to the external interface.
Although you can't assign a static IP directly to a pod, you can create a service that exposes the pods and allows you to route traffic to them via an external IP address.
For example, you could expose the deployment by running the following command which would create a service (this command presumes your application is listening on port 8080):
kubectl expose deployment DEPLOYMENT_NAME --type=LoadBalancer --port 80 --target-port 8080
To retrieve the resulting external IP address run:
kubectl get services
There is some more information on this here
You could also generate an external IP by creating an ingress resource as detailed here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With