When you deploy a service in Kubernetes, the platform automatically creates a DNS record for that service. This allows pods within the cluster to discover and communicate with the service using a consistent DNS name, regardless of where the pods implementing that service are running or how many replicas exist.
> When you create a Kubernetes Service object, the control plane assigns it a virtual IP address (ClusterIP).
> Simultaneously, the Kubernetes DNS service (CoreDNS by default in recent versions) creates DNS records for the service following this pattern: service-name.namespace.svc.cluster.local
> When a pod needs to communicate with a service, it can simply use this DNS name, which resolves to the service's ClusterIP.
> The kube-proxy component, running on each node, maintains network rules that allow traffic sent to the ClusterIP to be load-balanced across the backing pods.