Flush DNS settings changes in Azure Spring Apps
Note
The Basic, Standard, and Enterprise plans will be deprecated starting from mid-March, 2025, with a 3 year retirement period. We recommend transitioning to Azure Container Apps. For more information, see the Azure Spring Apps retirement announcement.
The Standard consumption and dedicated plan will be deprecated starting September 30, 2024, with a complete shutdown after six months. We recommend transitioning to Azure Container Apps. For more information, see Migrate Azure Spring Apps Standard consumption and dedicated plan to Azure Container Apps.
This article applies to: ❎ Basic ✅ Standard ✅ Enterprise
Note
This feature is only available for virtual-network-injected Azure Spring Apps service instances.
This article explains how to update your DNS settings in a virtual-network-injected Azure Spring Apps service instance.
Changes to the custom DNS servers in the virtual network settings won't take effect until the network service is restarted in all the underlying nodes. This restart is required so that the nodes can load the new settings. Previously, you had to reboot the whole Azure Spring Apps instance to apply any changes to the DNS settings. With the new flush DNS settings feature, you can avoid this time-consuming operation.
Flushing the DNS settings doesn't restart any underlying nodes or running applications within your service instance, but it does restart the network infrastructure to load the DNS setting changes. This restart can interrupt the network services and affect application availability for a few seconds.
Prerequisites
An Azure subscription. If you don't have an Azure subscription, create an Azure free account before you begin.
(Optional) Azure CLI version 2.52.0 or higher. Use the following commands to remove the previous version and install the latest extension. If you previously installed the Spring Cloud extension, uninstall it before you begin.
az extension remove --name spring az extension add --name spring az extension remove --name spring-cloud
An application deployed to Azure Spring Apps with virtual network injection enabled.
A configured custom DNS server in the virtual network setting.
Flush the DNS settings for an existing Azure Spring Apps instance
Use the following steps to flush the DNS settings for an existing Azure Spring Apps instance:
Sign in to the Azure portal.
On the Navigation menu, select Overview.
Select Flush DNS settings (preview).
Troubleshoot known issues
The following list describes some errors you might encounter when connecting to your DNS server:
Error:
Failed to connect DNS server, connection timed out.
If you get this error, check whether a network routing rule, or a firewall is blocking traffic from your service runtime or app subnets to your custom DNS server IP on port 53 or your custom DNS server listening port.
Error:
Failed to resolve IP.
If you get this error, check whether the upstream DNS server is correctly configured in your DNS server. To solve this issue, add Azure DNS IP
168.63.129.16
as the upstream DNS server in your custom DNS server. If you can't use Azure DNS as the upstream server, use other valid upstream servers to ensure that all required domains can be resolved. For more information, see Customer responsibilities for running Azure Spring Apps in a virtual network.Error:
Not all the VM instances in the cluster are in succeeded running state.
This error usually indicates that there are some incorrect DNS or other networking settings blocking the underlying nodes provisioning. To mitigate this issue, fix the networking settings and restart the Azure Spring Apps service instance. For more information, see Customer responsibilities for running Azure Spring Apps in a virtual network and Troubleshooting Azure Spring Apps in virtual networks.