This directory contains example configurations and deployment files for the CoreSMD project, which provides both CoreDHCP and CoreDNS plugins for OpenCHAMI clusters.
coredns/examples/
├── README.md # This file
├── basic/ # Basic CoreDNS configurations
│ └── Corefile
├── advanced/ # Advanced CoreDNS configurations
│ └── Corefile
└── kubernetes/ # Kubernetes deployment examples
├── coredns-deployment.yaml
└── coredns-configmap.yaml
-
Build the binary: NB Builds must happen on a linux host in the root of the repository
goreleaser build --snapshot --clean --single-target
-
Run with basic configuration:
./dist/coredns_linux_amd64_v1/coredns -conf coredns/examples/basic/Corefile
-
Run with advanced configuration:
./dist/linux_amd64/coredns_linux_amd64_v1/coredns -conf coredns/examples/advanced/Corefile
Simple DNS server configuration with:
- CoreSMD plugin for dynamic DNS records
- Prometheus metrics endpoint
- Forward DNS resolution
Enhanced configuration with:
- Multiple DNS zones
- TLS certificate support
- Custom hostname patterns
- Extended cache duration
Deploy to Kubernetes using the provided manifests:
kubectl apply -f coredns/examples/kubernetes/Update the smd_url parameter in your configuration to point to your SMD instance:
# CoreDNS
coresmd {
smd_url https://your-smd-server.local
}Configure custom DNS zones in CoreDNS:
coresmd {
smd_url https://smd.cluster.local
zone custom.local {
nodes node{04d}
}
}
# Test A record lookup (IPv4)
dig @localhost nid0001.cluster.local A
# Test AAAA record lookup (IPv6)
dig @localhost nid0001.cluster.local AAAA
# Test PTR record lookup (IPv4)
dig @localhost -x 192.168.1.10
# Test PTR record lookup (IPv6)
dig @localhost -x fd00:100::10
# Test TXT record lookup
dig @localhost TXT nid0001.cluster.local# CoreDNS metrics
curl http://localhost:9153/metrics | grep coresmd
# Health check
curl http://localhost:9153/ready-
SMD Connection Failed
- Verify SMD URL is accessible
- Check network connectivity
- Validate CA certificate (if using TLS)
-
No DNS Records Generated
- Check SMD cache is populated
- Verify zone configuration
- Review plugin logs