This Helm chart deploys a PowerDNS-based DNS cluster for the Liberu Control Panel with support for both MySQL/MariaDB and PostgreSQL backends.
Default Database Backend: MariaDB - MariaDB is the default and recommended database backend for PowerDNS. PostgreSQL is available as an alternative option for users who prefer it.
- PowerDNS: Authoritative DNS server with configurable database backend
- Database: MariaDB (default) or PostgreSQL (optional, automatically deployed)
- PowerDNS Admin: Web interface for DNS management (optional)
The chart supports two database backends, with MariaDB as the default:
databaseBackend: mysql # This is the default valueMariaDB is the recommended and default backend for PowerDNS due to its:
- Proven stability with PowerDNS
- Better performance for DNS workloads
- Simpler configuration and maintenance
- Wide community support
databaseBackend: postgresqlPostgreSQL is available as an alternative for users who:
- Have existing PostgreSQL infrastructure
- Prefer PostgreSQL for organizational reasons
- Need specific PostgreSQL features
The database backend can be selected via the databaseBackend value. The chart will automatically:
- Deploy the appropriate database StatefulSet
- Configure PowerDNS with the correct driver (gmysql or gpgsql)
- Initialize the database schema
The simplest installation uses the default MariaDB backend:
helm install dns-cluster ./helm/dns-cluster \
--namespace control-panel \
--set powerdns.mysql.password=<secure-password> \
--set powerdns.api.key=<secure-api-key>This will deploy PowerDNS with MariaDB as the database backend.
To use PostgreSQL instead of the default MariaDB:
helm install dns-cluster ./helm/dns-cluster \
--namespace control-panel \
--set databaseBackend=postgresql \
--set powerdns.postgresql.password=<secure-password> \
--set powerdns.api.key=<secure-api-key>Note: If you don't specify databaseBackend, MariaDB is used by default.
# databaseBackend: mysql # This is the default, can be omitted
powerdns:
mysql:
host: mariadb # Or use the auto-deployed: dns-cluster-mysql
port: 3306
database: powerdns
username: powerdns
password: <secure-password>databaseBackend: postgresql # Must be explicitly set for PostgreSQL
powerdns:
postgresql:
host: postgresql # Or use the auto-deployed: dns-cluster-postgresql
port: 5432
database: powerdns
username: powerdns
password: <secure-password>powerdns:
enabled: true
replicaCount: 3
api:
enabled: true
key: change-this-api-key
config:
allowAxfrIps: "0.0.0.0/0"
masterServer: "yes"
slaveServer: "yes"
# Performance tuning
maxConnections: 100
queryCacheEnabled: true
queryCacheTtl: 20powerdnsAdmin:
enabled: true
replicaCount: 2
ingress:
enabled: true
hosts:
- host: dns-admin.example.com- Port 53 (TCP/UDP): DNS queries
- Port 8081: REST API (internal)
The service is exposed via LoadBalancer for external DNS queries:
kubectl get svc -n control-panel dns-cluster-powerdnsThe chart automatically deploys a database StatefulSet based on your databaseBackend selection. No manual database setup is required.
If you prefer to use an external database:
CREATE DATABASE powerdns;
CREATE USER 'powerdns'@'%' IDENTIFIED BY 'secure-password';
GRANT ALL PRIVILEGES ON powerdns.* TO 'powerdns'@'%';
FLUSH PRIVILEGES;Then set the host to your external database:
powerdns:
mysql:
host: external-mariadb.example.com
port: 3306CREATE DATABASE powerdns;
CREATE USER powerdns WITH PASSWORD 'secure-password';
GRANT ALL PRIVILEGES ON DATABASE powerdns TO powerdns;Then set the host to your external database:
powerdns:
postgresql:
host: external-postgres.example.com
port: 5432The PowerDNS schema will be initialized automatically on first run for both backends.
Access the PowerDNS API:
# Port-forward the API
kubectl port-forward -n control-panel svc/dns-cluster-powerdns 8081:8081
# Get zones
curl -H "X-API-Key: your-api-key" http://localhost:8081/api/v1/servers/localhost/zonesConfigure secondary nameservers in values:
secondaryNameservers:
- ns1.example.com
- ns2.example.com
- ns3.example.comEnable DNSSEC:
dnssec:
enabled: trueFor production deployments:
helm install dns-cluster ./helm/dns-cluster \
--set powerdns.replicaCount=5 \
--set powerdnsAdmin.enabled=true \
--set powerdns.service.type=LoadBalancerPowerDNS includes:
- Liveness probes on port 53
- Readiness probes on port 53
- Optional metrics endpoint
Test DNS resolution:
# Get LoadBalancer IP
LB_IP=$(kubectl get svc -n control-panel dns-cluster-powerdns -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
# Query DNS
dig @$LB_IP example.comhelm uninstall dns-cluster --namespace control-panel