4

I am thinking of using K8S namespace for looking up services - using a git hash as the namespace for each version of a server, etc.

https://kubernetes.io/docs/tasks/administer-cluster/namespaces/#understanding-namespaces-and-dns

if you read the above it says internally the dns lookup uses a form:

<service-name>.<namespace-name>.svc.cluster.local

my question is - is there a way to expose the internal dns externally somehow? And specifically I am wondering if there is a way to provide the dns name instead of it being auto-created.

Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
  • You probably want something like calico https://docs.projectcalico.org/v3.7/getting-started/kubernetes/ – KeepCalmAndCarryOn Jun 28 '19 at 21:24
  • and maybe this for ingress into the cluster https://docs.projectcalico.org/v3.5/usage/external-connectivity – KeepCalmAndCarryOn Jun 28 '19 at 21:29
  • It would help to understand where / how you are running Kubernetes. This would typically be handled with a combination of Ingress and LoadBalancer type Service. – Andy Shinn Jun 28 '19 at 22:21
  • Possible duplicate of [How to expose kube-dns service for queries outside cluster?](https://stackoverflow.com/questions/37449121/how-to-expose-kube-dns-service-for-queries-outside-cluster) – Nepomucen Jul 03 '19 at 07:51
  • I think the answer to similar question on Stack Overflow was given already here: https://stackoverflow.com/questions/37449121/how-to-expose-kube-dns-service-for-queries-outside-cluster – Nepomucen Jul 03 '19 at 08:23
  • This may help you to expose your service to outside the cluster [Using a Service to Expose Your App](https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/) – Sriram G May 07 '20 at 19:18

0 Answers0