Deploying the Operator¶
The Bindy operator watches for DNS resources and manages BIND9 configurations.
Prerequisites¶
Before deploying the operator:
- CRDs must be installed
- RBAC must be configured
- Namespace must exist (
dns-systemrecommended)
Installation¶
Create Namespace¶
Install RBAC (Latest Release)¶
Install from the latest stable release:
kubectl apply -f https://github.com/firestoned/bindy/releases/latest/download/rbac/serviceaccount.yaml
kubectl apply -f https://github.com/firestoned/bindy/releases/latest/download/rbac/role.yaml
kubectl apply -f https://github.com/firestoned/bindy/releases/latest/download/rbac/rolebinding.yaml
Or install from a specific version:
kubectl apply -f https://github.com/firestoned/bindy/releases/download/v0.3.0/rbac/serviceaccount.yaml
kubectl apply -f https://github.com/firestoned/bindy/releases/download/v0.3.0/rbac/role.yaml
kubectl apply -f https://github.com/firestoned/bindy/releases/download/v0.3.0/rbac/rolebinding.yaml
This creates: - ServiceAccount for the operator - ClusterRole with required permissions - ClusterRoleBinding to bind them together
Deploy Operator (Latest Release)¶
Install from the latest stable release:
kubectl apply -f https://github.com/firestoned/bindy/releases/latest/download/operator/deployment.yaml
Or install from a specific version:
kubectl apply -f https://github.com/firestoned/bindy/releases/download/v0.3.0/operator/deployment.yaml
Wait for Readiness¶
Verify Deployment¶
Check operator pod status:
Expected output:
Check operator logs:
You should see:
{"timestamp":"2024-01-01T00:00:00Z","level":"INFO","message":"Starting Bindy operator"}
{"timestamp":"2024-01-01T00:00:01Z","level":"INFO","message":"Watching DNSZone resources"}
{"timestamp":"2024-01-01T00:00:01Z","level":"INFO","message":"Watching DNS record resources"}
Configuration¶
Environment Variables¶
Configure the operator via environment variables:
| Variable | Default | Description |
|---|---|---|
RUST_LOG |
info |
Log level (error, warn, info, debug, trace) |
BIND9_ZONES_DIR |
/etc/bind/zones |
Directory for zone files |
RECONCILE_INTERVAL |
300 |
Reconciliation interval in seconds |
Edit the deployment to customize:
Resource Limits¶
For production, set appropriate resource limits:
High Availability¶
Run multiple replicas with leader election:
Troubleshooting¶
Operator Not Starting¶
-
Check pod events:
-
Check if CRDs are installed:
-
Check RBAC permissions:
High Memory Usage¶
If the operator uses excessive memory:
- Reduce log level:
RUST_LOG=warn - Increase resource limits
- Check for memory leaks in logs
Next Steps¶
- Step-by-Step Guide - Create your first DNS zone
- Configuration - Advanced configuration
- Monitoring - Set up monitoring