Open topic with navigation

# Assigning an IP Address to Private DNS

In this step you assign an IP address from the aks-subnet range to the domain name (external access host).

To assign an IP address to private DNS:

1. Set your main resource group name to an environment variable; for example:
   `RESOURCE_GROUP=srg-demo`

Alternatively, use the resource group where your `vnet` and `private-dns` zone are located.

1. Get the address prefix by running the command:
   `az network vnet subnet show -g $RESOURCE_GROUP --vnet-name <your virtual network> --name <subnet for AKS>| jq -r .addressPrefix`

For example:
`az network vnet subnet show -g $RESOURCE_GROUP --vnet-name demo-vnet --name aks-subnet | jq -r .addressPrefix`
Example result:
`10.1.1.0/24`

You can select any IP from this range (excepting the first N IP addresses, which are occupied by AKS nodes).

Example selection in this range: `10.1.1.101`

1. Assign the IP by running the following command:
   `az network private-dns record-set a add-record -g $RESOURCE_GROUP -z <PRIVATE DNS ZONE> -n <RECORD SET NAME> -a <EXTERNAL-IP>`

Parameters

`<PRIVATE DNS ZONE>` is the `private-dns` zone created earlier (in our example it was `arcsight.private.com`).

`<RECORD SET NAME>` the name of the record set relative to the zone (in our example, `installer`).

<`EXTERNAL-IP>` IP must be from aks-subnet range.

Example command:
`az network private-dns record-set a add-record -g $RESOURCE_GROUP -z arcsight.private.com -n installer -a 10.1.1.101`
This command will create `installer.arcsight.private.com` with the IP address 10.1.1.101.

Next Step: Uploading Product Images