Kubernetes create private namespace/domain (FQDNs)

4/27/2018

I am migrating legacy product(VMs) to kubernetes. This product defines its services inside the product using FQDN style and makes heavy use of /etc/hosts files to simulate DNS and implement services resolution

#service names
service1.customer.domain.com
service2.customer.domain.com

# /etc/hosts
192.22.22.21 service1.customer.domain.com
192.22.22.22 service2.customer.domain.com

Changing this FQDN service naming style e.g. servicename.a.b.c would have significant impact on the product so I am trying to maintain this.I was looking to see how i could achieve this in Kubernetes. I hoped to use Kubernetes Namespaces but they disallow FQDN style enforcing a namespace with a single String with no dots while Kubernetes Services apply similar restrictions.

I might have to just bite the bullet and refactor it fully but I was wondering if there was a simpler way to replicate the service name/resolution behaviour in the legacy product in kubernetes?

We cannot control the root domain, this is defined by our customer e.g. customer1.netwk5.workers.us.com. We would use this to define things like cookie domain, generate SSL certs for web server, configure LDAP and so on

-- user1843591
containers
dns
docker
kubernetes

0 Answers