The Cluster DNS Operator is a Kubernetes operator written in Go that manages DNS services for OpenShift clusters. It deploys and manages CoreDNS to provide name resolution services that enable DNS-based Kubernetes Service discovery within OpenShift environments. The operator is designed to work effectively out of the box by automatically creating a functional default deployment based on the cluster's configuration, with the default cluster domain set to cluster.local.
The operator deploys CoreDNS using a DaemonSet topology, ensuring that each node in the cluster runs a local CoreDNS pod replica. This architecture provides both scalability as clusters grow or shrink and resilience when nodes become temporarily isolated. The DaemonSet pod template includes a dns container running CoreDNS and a dns-node-resolver container that manages the cluster image registry service's DNS name in the host node's /etc/hosts file. The operator configures CoreDNS with the kubernetes plugin to resolve cluster service DNS names in the format service-name.namespace.svc.cluster.local to their corresponding Service endpoints. For external DNS resolution, CoreDNS forwards requests to upstream name servers configured in the node's /etc/resolv.conf file, with support for user-configured additional upstreams for specific zones.
The operator creates a Service with a fixed IP address derived from the service network CIDR by taking the tenth address in the address space. When pods are created, the kubelet injects this DNS service IP address into the pod's /etc/resolv.conf file, allowing pods to query the DNS service. DNS query flows differ based on whether queries target cluster services or external names. Cluster service queries route through the service proxy to a randomly selected CoreDNS instance, while external DNS queries are forwarded to upstream name servers. Pods using host networking or processes running directly on nodes use the name servers in the host's /etc/resolv.conf instead.
The repository shows moderate activity with a median issue and pull request response latency of 627.2 hours and a mean latency of 1212.8 hours. The most active contributors tracked include sebrandon1 with three events, Miciah with two events, and jmguzik with one event. The repository has been classified with lifecycle/rotten labels on two items and one tide/merge-blocker label, indicating some issues requiring attention. The codebase overlaps with other OpenShift repositories including openshift/installer, openshift/coredns, and openshift/node-problem-detector through shared contributors.
The operator supports limited configuration of the CoreDNS Corefile and kubernetes plugin, allowing customization while maintaining sensible defaults. A special case exists where the dns-node-resolver container adds the image registry service's DNS name to the node's /etc/hosts file so that the container runtime and kubelet can resolve the registry service. The operator handles the distinction between container networking pods and host-network pods, with the latter using the node's configured name servers. The repository includes development documentation in HACKING.md and directs bug reports to the Red Hat Issue Tracker rather than GitHub issues.