In this demonstration, we are going to create a private DNS zone in a new resource group.
To configure a private DNS zone using the CLI from Azure Cloud Shell, you have to take the following steps:
- Navigate to the Azure portal by opening https://portal.azure.com.
- In the top-right menu, select the Azure Cloud Shell icon. Make sure that Bash is selected.
- First, we need to create a new resource group. Add the following command for this:
az group create --name PacktPrivateDNSResourceGroup --location "East US"
- Then, we are going to create a new VNet:
az network vnet create \
--name PacktPrivateDNSVNet \
--resource-group PacktPrivateDNSResourceGroup \
--location eastus \
--address-prefix 10.2.0.0/16 \
--subnet-name backendSubnet \
--subnet-prefixes 10.2.0.0/24
- Next, we need to create the private DNS zone:
az network dns zone create...