<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">abdirahman.osm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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/" 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" data-smartmail="gmail_signature"><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" target="_blank">pavimohan3004@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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" target="_blank">abdirahman.osm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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" target="_blank">pavimohan3004@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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" target="_blank">abdirahman.osm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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" target="_blank">s.safarov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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" 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" 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" target="_blank">pavimohan3004@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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" target="_blank">s.safarov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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" target="_blank">pavimohan3004@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><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" 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><br><br>_______________________________________________<br><br><br>Kamailio (SER) - Users Mailing List<br><br><br><a href="mailto:sr-users@lists.kamailio.org" rel="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" 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" 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" 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" 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" 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" 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" 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" 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" class="gmail_signature" data-smartmail="gmail_signature"><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>