Answers: <p>While I don't have extensive experience with it, I believe Istio and other service meshes are built for this (and more complex things).</p>
  <p><a href="https://www.alibabacloud.com/blog/597011" rel="nofollow noreferrer">https://www.alibabacloud.com/blog/597011</a></p>
  <p>Looks like it has a &quot;global&quot; DNS name format for inter cluster routing in addition to the local format.</p>
  <blockquote>
  <p>Services in the same Kubernetes cluster have the same DNS suffix, for example, svc.cluster.local. Kubernetes DNS provides the DNS resolution capability for these services. To deploy a similar configuration for services in the remote cluster, we name the services in the remote cluster in the .global format.</p>
  <p>The Istio installation package includes a CoreDNS server that provides the DNS resolution capability for these services. To use the DNS resolution capability, you need to direct the DNS service of Kubernetes to the CoreDNS service. Then, the CoreDNS service will act as the DNS server for the .global DNS domain.</p>
  </blockquote>
  
Answers: CC BY-SA 4.0
Answers: 2022-11-18T13:39:47.543Z
Answers: 2022-11-18T13:39:47.543Z
Answers: John Humphreys
Body: <p>I want to share the same dns name for two services exposing same port for different protocol. Earlier i was doing this with metallb with this annotation and metallb was sharing the same ip for two svc.</p>
  <blockquote>
  <p>metallb.universe.tf/allow-shared-ip: mykey</p>
  </blockquote>
  <p>In the AWS environment metallb is not there and i want to use something similar. In internet i found this link <a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/service/annotations/" rel="nofollow noreferrer">https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/service/annotations/</a>  for possible annotation in aws. but didn't find any dns shared annotation. Note :- My cluster is deployed using rke2 1.24.7 on aws instances. I am not using EKS.</p>
  
Tags: <kubernetes>
Title: Share DNS name between two k8s services deployed in aws
UserDisplayName: Jagrut Trivedi
ThreadText: # Share DNS name between two k8s services deployed in aws
  
  (Asked by: username_0 on 2022-11-18)
  
  I want to share the same dns name for two services exposing same port for different protocol. Earlier i was doing this with metallb with this annotation and metallb was sharing the same ip for two svc.
  
  > metallb.universe.tf/allow-shared-ip: mykey
  
  In the AWS environment metallb is not there and i want to use something similar. In internet i found this link <https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/service/annotations/> for possible annotation in aws. but didn't find any dns shared annotation. Note :- My cluster is deployed using rke2 1.24.7 on aws instances. I am not using EKS.
  
  **Tags:** kubernetes
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-11-18. Score: 1
  
  While I don't have extensive experience with it, I believe Istio and other service meshes are built for this (and more complex things).
  
  <https://www.alibabacloud.com/blog/597011>
  
  Looks like it has a "global" DNS name format for inter cluster routing in addition to the local format.
  
  > Services in the same Kubernetes cluster have the same DNS suffix, for example, svc.cluster.local. Kubernetes DNS provides the DNS resolution capability for these services. To deploy a similar configuration for services in the remote cluster, we name the services in the remote cluster in the .global format.
  >
  > The Istio installation package includes a CoreDNS server that provides the DNS resolution capability for these services. To use the DNS resolution capability, you need to direct the DNS service of Kubernetes to the CoreDNS service. Then, the CoreDNS service will act as the DNS server for the .global DNS domain.
  
  
  ---
  
  