<div dir="ltr"><div>Thanks David, glad it worked.</div><div><br></div><div>@ Pavithra,</div><div><br></div><div>I am not familiar how the bind9, DNS, and SRV records works with Kamailio.</div><div><br></div><div>May be you can set the Kubernetes cluster domain to <a href="http://sip.example.com">sip.example.com</a> and then for the Pcscf pod the DNS record will be <b><a href="http://pcscf-0.pcscf-service.namespace.sip.example.com">pcscf-0.pcscf-service.namespace.sip.example.com</a></b></div><div><br></div><div>You configure the local domain in the kubelet with the flag --cluster-domain=<default-local-domain>.</div><div><br></div><div><br clear="all"></div><div dir="ltr"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Abdirahman A. Osman<div><div><br></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 28 Aug 2020 at 15:03, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">Abdirahman,</div><div dir="auto"><br></div><div dir="auto">Thanks for the pointer, that worked like a charm!</div><div dir="auto"><br></div><div dir="auto">David</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 27 Aug 2020 at 20:11, Pavithra Mohanraja <<a href="mailto:pavimohan3004@gmail.com" target="_blank">pavimohan3004@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi Abdirahman,<div dir="auto"><br><div dir="auto">One small doubt . In kamailio IMS server, we have dns configurations using bind9 with SRV records pointing a port for every ip address .</div><div dir="auto"><br></div><div dir="auto">My domain name is <a href="http://sip.example.com" target="_blank">sip.example.com</a></div><div dir="auto"><br></div><div dir="auto"><a href="http://Pcscf.sip.example.com:4060" target="_blank">Pcscf.sip.example.com:4060</a></div><div dir="auto"><a href="http://Icscf.sip.example.com:4070" target="_blank">Icscf.sip.example.com:4070</a></div><div dir="auto"><a href="http://scscf.sip.example.com:4080" target="_blank">scscf.sip.example.com:4080</a></div><div dir="auto"><a href="http://hss.sip.example.com" target="_blank">hss.sip.example.com</a></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">So this is how the dns server will be in my case.</div><div dir="auto"><br></div><div dir="auto">The same domain names are configured as alias in my respective  cscf config files.</div><div dir="auto"><br></div><div dir="auto">When you talk about nameserver . How this has to be configured using coredns/kubedns setting clusterIP : None</div><div dir="auto"><br></div><div dir="auto">How this can be done from your point of view using coredns. </div><div dir="auto"><br></div><div dir="auto">Kindly help me with this</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Pavithra</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 27, 2020, 11:55 PM David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">Interesting! I’ll be testing that very soon! Many thanks!!</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 27 Aug 2020 at 14:53, Abdirahman A. Osman <<a href="mailto:abdirahman.osm@gmail.com" rel="noreferrer" target="_blank">abdirahman.osm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi David,</div><div><br></div><div>Yes that is right, so when you set to ClusterIP:none, it turns the services into a headless services. and the DNS will resolve to a single POD, instead of a group of PODs, and you can reach every POD through the DNS. IPs may change but the DNS will stay fixed when you use Statefullset, as you need a fixed DNS name for the pod. If you  use Deployment you get a randomly generated name, which is not what you want.</div></div><div dir="ltr"><div><br></div><div><br clear="all"></div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Abdirahman <br><div><div><br></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 27 Aug 2020 at 08:06, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" rel="noreferrer" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">Hello Abdirahman,</div><div dir="auto"><br></div><div dir="auto">Thanks for replying.</div><div dir="auto"><br></div><div dir="auto">Do you mean if I create a service for the label selector of what’s running in the pod, but ser ClusterIP: None, when another pod tries to resolve that service, it will get the actual IP of the running POD?</div><div dir="auto"><br></div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 26 Aug 2020 at 18:02, Abdirahman A. Osman <<a href="mailto:abdirahman.osm@gmail.com" rel="noreferrer" target="_blank">abdirahman.osm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Pavithra,</div><div><br></div><div>Since POD IPs change, you have to rely on DNS records. To have a fixed DNS name like <br><br>kamailio.kamalio-service.namespace.svc.cluster.local<br><br><br><br> for a pod you will have to use StatefullSet, so the pod DNS name doesn't change. Also you have to use Services and set it to ClusterIP: none, it will turn your pods to headless services and no load balancing is involved. and from my understanding you will be able to reach each POD directly through the DNS name. <br></div><div></div><div><a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="noreferrer" target="_blank">https://kubernetes.io/docs/concepts/services-networking/service/</a></div><div><br></div><div>and don't forget to set  your /etc/resolv.conf with the kubedns IP address.</div></div><div dir="ltr"><div></div><div><br></div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Abdirahman<div><div><br></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 26 Aug 2020 at 12:45, Pavithra Mohanraja <<a href="mailto:pavimohan3004@gmail.com" rel="noreferrer" target="_blank">pavimohan3004@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi Abdirahman,<div dir="auto"><br></div><div dir="auto">Do you mean , if I set clusterIP as None, then kubedns server will be pointing to pod ip so that kubedns/coredns will use pod ip for pod communication instead of service IP.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Is my understanding correct? From your explanation.</div><div dir="auto"><br></div><div dir="auto">If this is the case, pod ip will be changing whenever I launch the pods . How that can be resolved.</div><div dir="auto"><br></div><div dir="auto">Could you kindly helo me with this?</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Pavithra</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 26, 2020, 9:26 PM Abdirahman A. Osman <<a href="mailto:abdirahman.osm@gmail.com" rel="noreferrer" target="_blank">abdirahman.osm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>David,</div><div><br></div><div><br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Assuming those are pod ips. Using services doesn’t work <br><br>since the dns name will resolve to a k8s service ip and no the actual <br><br>pod running the service.</div></blockquote><div><br></div><div>If you set   <b>clusterIP: None</b> in the services, you will get POD IP.<br> </div><br><br><br><br></div><div><br clear="all"></div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Abdirahman <br><div><div><br></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 26 Aug 2020 at 10:48, Pavithra Mohanraja <<a href="mailto:pavimohan3004@gmail.com" rel="noreferrer noreferrer" target="_blank">pavimohan3004@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Hi, <div dir="auto">Thanks for the answers.</div><div dir="auto">@David has got my question.</div><div dir="auto"><br></div><div dir="auto">I have a seperate dns server running in my pcscf pod . So in my /etc/resolv.conf file , I would be configuring </div><div dir="auto">nameserver <pcscf pod ip></div><div dir="auto">in all other cscf pods as well for communication.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">My question here is how to change the dns server pointing to cluster ip so that my domain name for IMS will be pointing to coredns itself. It will restrict me from using pod IP since it changes everytime.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">@David, can you please tell me the last two lines briefly. I did not get it.how you configured . You mean to say still you are using pod Ip.</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 26, 2020, 8:02 PM David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" rel="noreferrer noreferrer" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">I’ve been trying to figure this out as well.</div><div dir="auto">I haven’t yet found a way of publishing to kube-dns the pod IP of the running service. </div><div dir="auto"><br></div><div dir="auto">I.e.: </div><div dir="auto">kamailio.whatever.local on ip 10.0.0.1</div><div dir="auto">Rtpengine.whatever.local on ip 10.0.0.2</div><div dir="auto">Appserver.whatever.local on 10.0.0.3</div><div dir="auto"><br></div><div dir="auto">Assuming those are pod ips. Using services doesn’t work since the dns name will resolve to a k8s service ip and no the actual pod running the service.</div><div dir="auto"><br></div><div dir="auto">Assigning IPs hardcoded doesn’t work either since it might change if the docker changes pod. I can have multiple modes on which a service can run, but only one service (kamailio, rtpengine, appserver, etc) will run on a given pod.</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 26 Aug 2020 at 15:18, Abdirahman A. Osman <<a href="mailto:abdirahman.osm@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">abdirahman.osm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi <br><br>Pavithra<br><br><br><br><br><br><br><br></div><div><br></div><div>You can use the kubedns/CoreDNS of the kubernetes cluster to resolve Internal DNS records of the pods.To assign DNS records for each POD you have to deploy a service and set the ClusterIP: none. and the dns record will be something like kamailio.kamalio-service.platform.svc.cluster.local</div><div></div><div>which is the podname.servicename.namespace.svc.cluster.local</div><div><br></div><div>In the resolve.conf you will put the kubeDNS/CoreDNS IP as the nameserver.  You can set this in the kubernetes manifest file <br></div><div><br></div><div>      dnsPolicy: "None"<br>      dnsConfig:<br>        nameservers:<br>          - 10.34.0.1 (<br><br> kubeDNS/CoreDNS ) <br><br><br><br></div></div><div dir="ltr"><div></div><div><br></div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Abdirahman<div><div><br></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 25 Aug 2020 at 15:34, Sergey Safarov <<a href="mailto:s.safarov@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">s.safarov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I am not k8s developer.<br>So cannot provide detailed instructions. Just my point of view.<br><br>You can look<br><a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/" rel="noreferrer noreferrer noreferrer" target="_blank">https://kubernetes.io/docs/concepts/extend-kubernetes/operator/</a><br><a href="https://www.magalix.com/blog/creating-custom-kubernetes-operators" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.magalix.com/blog/creating-custom-kubernetes-operators</a><br><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 25, 2020 at 7:41 PM Pavithra Mohanraja <<a href="mailto:pavimohan3004@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">pavimohan3004@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">It would be helpful if you could elaborate what has to be done for kubernetes pods when you mention sip ingress</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto"><br><br>Pavithra<br><br><br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 25, 2020, 9:32 PM Sergey Safarov <<a href="mailto:s.safarov@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">s.safarov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Lot of issues with static IP in Kubernetes.<br><br><div>Looks as need deploy "sip ingress" like "HTTP/HTTPS ingress" and then route calls to pods.<br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 25, 2020 at 4:40 PM Pavithra Mohanraja <<a href="mailto:pavimohan3004@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">pavimohan3004@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><div><br></div><div>I am configuring kamailio IMS as kubernetes pods .</div><div>so each component will be configured as separate pod .</div><div>In order to establish a connection between pods , I am configuring bind9 dns server in pcscf pod itself. Communication is happening via Pod IP address.</div><div><br></div><div>Is there any possibility to have the communication using cluster IP . If anybody is aware of kubernetes, Please help me in this regard.</div><div><br></div><div>I have my /etc/resolv.conf file in pods with</div><div>nameserver <clusterIP></div><div>search <cluster-dns-domain-name></div><div><br></div><div>Please help.</div><div><br></div><div><br></div><div>Thanks,</div><div>Pavithra</div></div><br><br>_______________________________________________<br><br><br>Kamailio (SER) - Users Mailing List<br><br><br><a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br><br><br><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br><br><br></blockquote></div><br><br>_______________________________________________<br><br><br>Kamailio (SER) - Users Mailing List<br><br><br><a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br><br><br><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br><br><br></blockquote></div><br><br>_______________________________________________<br><br><br>Kamailio (SER) - Users Mailing List<br><br><br><a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br><br><br><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br><br><br></blockquote></div><br><br>_______________________________________________<br><br><br>Kamailio (SER) - Users Mailing List<br><br><br><a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br><br><br><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br><br><br></blockquote></div></div><br><br>_______________________________________________<br><br>Kamailio (SER) - Users Mailing List<br><br><a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br><br><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br><br></blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div><br><br>_______________________________________________<br><br><br>Kamailio (SER) - Users Mailing List<br><br><br><a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br><br><br><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br><br><br></blockquote></div></div></div><br><br></blockquote></div></div><br><br></blockquote></div><br><br></blockquote></div></div><br><br></blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" rel="noreferrer" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div><br><br></blockquote></div></div><br><br></blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" rel="noreferrer" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div><br><br></blockquote></div><br><br></blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>