This article provides step-by-step guidance for Setting Up DNS on Azure to support Redis clusters. It includes Prerequisites, a detailed Step-by-Step Setup using Azure DNS Zones, an Alternative Load Balancer Option, and a Troubleshooting section for common DNS issues. This guide ensures your Redis cluster nodes are properly reachable via FQDN for high availability and internal routing.
Prerequisites
- Access to an Azure Subscription with DNS Zone management permissions
- A registered domain (e.g.,
example.com) and the ability to delegate subdomains - Public IP addresses of each Redis cluster node
- For production use, you must use Azure Public DNS Zones—Private DNS zones don't support custom NS delegation
Step-by-Step: DNS Setup on Azure
-
Choose a Cluster Subdomain
- Example:
cluster1.example.com - This becomes your Redis cluster’s permanent Fully Qualified Domain Name (FQDN).
- Example:
-
Create DNS Zones in Azure
- Navigate to DNS Zones in the Azure Portal.
- If your parent domain (
example.com) doesn’t exist yet, create it first. - Then create a second DNS zone for your Redis subdomain (
cluster1.example.com).
-
Create NS Records in the Parent Zone
-
In the
example.comzone, add NS records to delegate the cluster subdomain to Redis nodes:cluster1.example.com. NS node1.cluster1.example.com. cluster1.example.com. NS node2.cluster1.example.com. cluster1.example.com. NS node3.cluster1.example.com.
-
-
Create A Records in the Cluster Zone
-
In the
cluster1.example.comzone, add an A record for each node:node1.cluster1.example.com. A [External IP of Node 1] node2.cluster1.example.com. A [External IP of Node 2] node3.cluster1.example.com. A [External IP of Node 3]
-
-
Set the FQDN During Cluster Installation
- Enter
cluster1.example.comin the Cluster Name / FQDN field during Redis installation. - This value is immutable post-installation.
- Enter
-
Validate DNS Propagation
- Use
nslookup,dig, or dnschecker.org to confirm DNS resolution is functioning globally.
- Use
Alternative: Using a Load Balancer
If DNS setup isn't feasible:
- Use an Azure Load Balancer to distribute traffic to Redis nodes.
- Be aware: This limits certain Redis features like transparent failover and dynamic endpoint generation.
Troubleshooting Common Issues
| Issue | Likely Cause | Solution |
|---|---|---|
| DNS doesn’t resolve | NS or A records are missing or incorrect | Double-check records in both parent and subdomain zones |
| Private zone delegation fails | Azure Private DNS does not support external delegation | Use Azure Public DNS or delegate via external DNS provider |
| "REFUSED" DNS errors | Firewall or incorrect DNS query source | Ensure correct network security groups and open port 53 |
| FQDN can’t be changed | FQDN is a one-time setup value | Reinstall Redis with new cluster name |
| New node added, but not reachable | A record not updated | Add or update A record in subdomain DNS zone |
| Propagation delays | DNS caching | Wait up to 24–48 hours and check TTL values |
0 comments
Please sign in to leave a comment.