Integrating OpenShift CoreDNS with Active Directory DNS

Integrating OpenShift CoreDNS with Active Directory (AD) enables your OpenShift cluster to resolve DNS records from your AD-managed domain. This article walks through the steps to configure CoreDNS to forward DNS queries to your AD DNS server.

Prere…


This content originally appeared on DEV Community and was authored by Mohamed Hamdi

Integrating OpenShift CoreDNS with Active Directory (AD) enables your OpenShift cluster to resolve DNS records from your AD-managed domain. This article walks through the steps to configure CoreDNS to forward DNS queries to your AD DNS server.

Prerequisites

  • OpenShift cluster with CoreDNS.
  • Active Directory DNS server (e.g., 192.168.1.10 for domain example.local).
  • OpenShift nodes must be able to reach the AD DNS server.

Steps to Configure CoreDNS for AD Integration

  • Edit the CoreDNS ConfigMap
oc edit configmap coredns -n openshift-dns
  • Modify the CoreDNS ConfigFile
. {
  forward . 8.8.8.8 8.8.4.4     # External DNS (Google DNS)
  forward . 192.168.1.10       # AD DNS server
  cache 300                    # Cache TTL for external queries (5 minutes)
  log                          # Enable logging
  metrics                      # Enable Prometheus metrics
  health                       # Enable health check
}

example.local:53 {
  forward . 192.168.1.10       # Forward queries for example.local to AD DNS
  cache 600                    # Cache TTL for AD domain queries (10 minutes)
  log                          # Log queries for example.local
}
  • Apply the Configuration
oc delete pod -n openshift-dns --all
  • Test DNS Resolution
oc run -i --tty --rm debug --image=busybox --restart=Never -- nslookup myhost.example.local
  • Monitor and Troubleshoot
oc logs -n openshift-dns <coredns-pod-name>

curl http://<coredns-pod-ip>:9180/health

Metrics: Monitor DNS metrics via Prometheus

Conclusion

By configuring CoreDNS to forward DNS queries to your AD DNS server, you enable your OpenShift cluster to resolve AD-managed domain records. With CoreDNS's caching, logging, metrics, and health checks, you can optimize DNS resolution and ensure a reliable DNS setup.


This content originally appeared on DEV Community and was authored by Mohamed Hamdi


Print Share Comment Cite Upload Translate Updates
APA

Mohamed Hamdi | Sciencx (2025-01-09T21:35:09+00:00) Integrating OpenShift CoreDNS with Active Directory DNS. Retrieved from https://www.scien.cx/2025/01/09/integrating-openshift-coredns-with-active-directory-dns/

MLA
" » Integrating OpenShift CoreDNS with Active Directory DNS." Mohamed Hamdi | Sciencx - Thursday January 9, 2025, https://www.scien.cx/2025/01/09/integrating-openshift-coredns-with-active-directory-dns/
HARVARD
Mohamed Hamdi | Sciencx Thursday January 9, 2025 » Integrating OpenShift CoreDNS with Active Directory DNS., viewed ,<https://www.scien.cx/2025/01/09/integrating-openshift-coredns-with-active-directory-dns/>
VANCOUVER
Mohamed Hamdi | Sciencx - » Integrating OpenShift CoreDNS with Active Directory DNS. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/09/integrating-openshift-coredns-with-active-directory-dns/
CHICAGO
" » Integrating OpenShift CoreDNS with Active Directory DNS." Mohamed Hamdi | Sciencx - Accessed . https://www.scien.cx/2025/01/09/integrating-openshift-coredns-with-active-directory-dns/
IEEE
" » Integrating OpenShift CoreDNS with Active Directory DNS." Mohamed Hamdi | Sciencx [Online]. Available: https://www.scien.cx/2025/01/09/integrating-openshift-coredns-with-active-directory-dns/. [Accessed: ]
rf:citation
» Integrating OpenShift CoreDNS with Active Directory DNS | Mohamed Hamdi | Sciencx | https://www.scien.cx/2025/01/09/integrating-openshift-coredns-with-active-directory-dns/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.