Ravichandra
Ravichandra

Reputation: 2352

How to use customise DNS along with cluster.local for kubernetes

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.

Upvotes: 0

Views: 387

Answers (1)

Arghya Sadhu
Arghya Sadhu

Reputation: 44687

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

Upvotes: 1

Related Questions