How can we use customized internal DNS for services and Pods? i.e along with cluster.local
I wished to use my-domain.local
.
For example, both my-svc.my-namespace.svc.cluster.local
and my-svc.my-namespace.svc.my-doamin.local
need to be resolved to same.
You can not add your custom domain like that but you can use ingress to route traffic from your domain to the services using name based virtual hosting.
foo.bar.com --| |-> foo.bar.com service1:80
| 178.91.123.132 |
bar.foo.com --| |-> bar.foo.com service2:80
https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting