Problem Description
The CoreDNS CRD plugin currently does not support wildcard DNS entries. When creating a DNSEndpoint with a wildcard pattern like *.example.com, queries for subdomains such as whatever.example.com fail to resolve.
Current Behavior
- DNSEndpoint with
dnsName: "*.example.com" is created
- Query for
whatever.example.com returns no results (NXDOMAIN or empty response)
- Only exact hostname matches work
Expected Behavior
- DNSEndpoint with
dnsName: "*.example.com" should match single-level subdomains
- Query for
whatever.example.com should resolve to the targets defined in the wildcard entry
- Follow standard DNS wildcard behavior:
*.example.com should match test.example.com ✓
*.example.com should NOT match example.com (apex domain) ✗
*.example.com should NOT match sub.test.example.com (multi-level) ✗
- Exact matches should take precedence over wildcard matches
Example Use Case
apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
name: wildcard-apps
labels:
k8gb.absa.oss/dnstype: local
spec:
endpoints:
- dnsName: "*.apps.example.com"
recordType: A
targets:
- 192.168.1.100
- 192.168.1.101
With this configuration:
app1.apps.example.com → should resolve to 192.168.1.100, 192.168.1.101
app2.apps.example.com → should resolve to 192.168.1.100, 192.168.1.101
apps.example.com → should NOT match the wildcard
Additional Context
This is a standard DNS feature (RFC 4592) and would greatly simplify DNS management for dynamic or multi-tenant environments where many subdomains need to resolve to the same targets.
Problem Description
The CoreDNS CRD plugin currently does not support wildcard DNS entries. When creating a DNSEndpoint with a wildcard pattern like
*.example.com, queries for subdomains such aswhatever.example.comfail to resolve.Current Behavior
dnsName: "*.example.com"is createdwhatever.example.comreturns no results (NXDOMAIN or empty response)Expected Behavior
dnsName: "*.example.com"should match single-level subdomainswhatever.example.comshould resolve to the targets defined in the wildcard entry*.example.comshould matchtest.example.com✓*.example.comshould NOT matchexample.com(apex domain) ✗*.example.comshould NOT matchsub.test.example.com(multi-level) ✗Example Use Case
With this configuration:
app1.apps.example.com→ should resolve to 192.168.1.100, 192.168.1.101app2.apps.example.com→ should resolve to 192.168.1.100, 192.168.1.101apps.example.com→ should NOT match the wildcardAdditional Context
This is a standard DNS feature (RFC 4592) and would greatly simplify DNS management for dynamic or multi-tenant environments where many subdomains need to resolve to the same targets.