DNS A record for container

By default when enabled, pods are assigned a DNS A record in the form of pod-ip-address.my-namespace.pod.cluster.local .

For example, a pod with IP in the namespace default with a DNS name of cluster.local would have an entry: 1-2-3-4.default.pod.cluster.local .

But the hostname is the Pod’s metadata.name value.
Is there a way to set the DNS A record to be the same metadata.name ?


Pretty sure this is covered in https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-hostname-and-subdomain-fields, could you give some more info on your use-case so we can think of a solution versus one implementation?