This guide explains how to configure DNS records for your cluster deployment to enable SSL certificates and proper routing.
When you deploy to a Kubernetes cluster, cert-manager needs to verify domain ownership via ACME HTTP-01 challenges. Without proper DNS records pointing to your cluster's ingress LoadBalancer, SSL certificates will fail to issue and your application will show certificate errors in browsers.
For an application named <app> deployed at domain <domain> (e.g., app operate-demo at domain bettrsw.com), create the following A records pointing to your nginx ingress LoadBalancer IP:
| Record Name | Type | Purpose |
|---|---|---|
<app>.<domain> |
A | Main application URL |
workers-dashboard.<app>.<domain> |
A | Workers dashboard (Temporal/Celery UI) |
preview.<app>.<domain> |
A | Permanent preview environment |
*.preview.<app>.<domain> |
A | Per-PR preview environments |
workers-dashboard.preview.<app>.<domain> |
A | Preview workers dashboard |
*.workers-dashboard.preview.<app>.<domain> |
A | Per-PR workers dashboards |
Important: Wildcard records (
*.preview.<app>.<domain>) do NOT cover the apex name (preview.<app>.<domain>). You must add both explicitly.
For app operate-demo at domain bettrsw.com with LoadBalancer IP 203.0.113.50:
operate-demo.bettrsw.com A 203.0.113.50
workers-dashboard.operate-demo.bettrsw.com A 203.0.113.50
preview.operate-demo.bettrsw.com A 203.0.113.50
*.preview.operate-demo.bettrsw.com A 203.0.113.50
workers-dashboard.preview.operate-demo.bettrsw.com A 203.0.113.50
*.workers-dashboard.preview.operate-demo.bettrsw.com A 203.0.113.50
kubectl get svc -n ingress-nginxLook for the EXTERNAL-IP of the ingress-nginx-controller service.
kubectl get ingress -ACheck the ADDRESS column for any ingress resource.
- Go to Networking → Load Balancers
- Find the load balancer created by your cluster
- Copy the IP address
After adding DNS records, verify they're resolving correctly:
# Check main domain
dig +short <app>.<domain>
# Check preview domain
dig +short preview.<app>.<domain>
# Check wildcard
dig +short pr-123.preview.<app>.<domain>All should return your LoadBalancer IP.
After DNS is configured, check that certificates are being issued:
# Check certificate status
kubectl get certificate -A
# Check for pending challenges
kubectl get challenges -A
# View cert-manager logs if issues persist
kubectl logs -n cert-manager -l app=cert-managerCertificates should move from Pending to Ready within a few minutes.
Symptoms:
kubectl get certificateshowsReady: False- Browser shows
NET::ERR_CERT_AUTHORITY_INVALID - nginx serves self-signed fallback certificate
Solutions:
-
Verify DNS records are correct:
dig +short <your-domain>
Should return your LoadBalancer IP.
-
Check ACME challenges:
kubectl get challenges -A kubectl describe challenge <challenge-name> -n <namespace>
-
Restart CoreDNS (if DNS was just added):
kubectl rollout restart deployment coredns -n kube-system
-
Check cert-manager logs:
kubectl logs -n cert-manager -l app=cert-manager --tail=100
- DNS changes can take 5-60 minutes to propagate globally
- Use
dig @8.8.8.8 <domain>to check Google's DNS - Clear local DNS cache:
sudo systemd-resolve --flush-caches(Linux) orsudo dscacheutil -flushcache(macOS)
If you recreated your cluster or ingress controller, the LoadBalancer IP may have changed. Update all DNS records with the new IP.
DNS records should be configured:
- Before first deployment - to avoid certificate errors
- After cluster creation - once the ingress LoadBalancer is provisioned
- After cluster recreation - if LoadBalancer IP changes