Service Discovery
Use Bindy for Kubernetes service discovery and internal DNS.
Kubernetes Service DNS
Automatic Service Records
Create DNS records for Kubernetes services:
apiVersion: v1
kind: Service
metadata:
name: myapp
namespace: production
spec:
selector:
app: myapp
ports:
- port: 80
---
# Create corresponding DNS record
apiVersion: bindy.firestoned.io/v1alpha1
kind: ARecord
metadata:
name: myapp
spec:
zone: internal-local
name: myapp.production
ipv4Address: "10.100.5.10" # Service ClusterIP
Service Discovery Pattern
graph TB
app["Application Query:<br/>myapp.production.internal.local"]
dns["Bindy DNS Server"]
result["Returns: 10.100.5.10"]
svc["Kubernetes Service"]
app --> dns
dns --> result
result --> svc
style app fill:#fff9c4,stroke:#f57f17,stroke-width:2px
style dns fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px
style result fill:#e1f5ff,stroke:#01579b,stroke-width:2px
style svc fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
Dynamic Updates
Automatically update DNS when services change (future enhancement):
# Controller watches Services and creates DNS records
Best Practices
- Consistent naming - Match service names to DNS names
- Namespace separation - Use subdomains per namespace
- TTL management - Short TTLs for dynamic services
- Health checks - Only advertise healthy services
Next Steps
- Integration - Integration patterns
- External DNS - External DNS integration