Share DNS name between two k8s services deployed in aws
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.
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.
While I don't have extensive experience with it, I believe Istio and other service meshes are built for this (and more complex things).
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.