<p>I have set up my frontend cluster in my Kubernetes and exposed as <code>frontend.loaner.com</code> and I want to point the DNS record of these both <code>johndoe.loaner.com</code>, <code>janedoe.loaner.com</code> to see the <code>frontend.loaner.com</code>.</p>

<p>Is that possible to just point two DNS to a 1 running server and works fine still having the hostname?</p>

<p>I read about the CNAME but it will redirect me to <code>frontend.loaner.com</code></p>

Sewer Rat
<p>You can do it with a Kubernetes <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">Ingress</a>. Basically, something like this:</p>

<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: frontend.loaner.com
    http:
      paths:
      - path: /
        backend:
          serviceName: backend1
          servicePort: 80
  - host: johndoe.loaner.com
    http:
      paths:
      - path: /
        backend:
          serviceName: backend2
          servicePort: 80
  - host: janedoe.loaner.com
    http:
      paths:
      - path: /
        backend:
          serviceName: backend3
          servicePort: 80
</code></pre>

<p>The above Ingress resource assumes you are using an <a href="https://github.com/kubernetes/ingress-nginx" rel="nofollow noreferrer">Nginx Ingress Controller</a> in your cluster.</p>
