Adding custom resolver locations
The task of the resolver location instance is to provide DNS resolver functions based on the forwarding rules that you configure. Add resolver locations to manage where your custom resolver deploys by using the UI, CLI, or API.
Custom resolver address propagation
Custom resolver addresses are propagated to the virtual server instance on the VPC.
Zone affinity settings
The order of IPs of a custom-resolver location is set with zone affinity. For example, say a custom resolver has the following locations.
us-south-1
: IP1us-south-2
: IP2us-south-3
: IP3
The DNS servers will appear similar to this example.
- Virtual server instance in
us-south-1
: IP1 IP2 IP3 - Virtual server instance in
us-south-2
: IP2 IP3 IP1 - Virtual server instance in
us-south-3
: IP3 IP1 IP2
Adding a resolver location in the UI
To add a custom resolver location, from the custom resolver details page:
-
From the Resolver locations tab, click Add location.
-
Select the subnet from the list menu in the row that appears.
Each custom resolver can have a maximum of three locations within the same subnet, or in different subnets. Also, to achieve high availability, you must configure custom resolvers with a minimum of two resolver locations.
The location is added when the subnet selection is made.
Adding a resolver location from the CLI
To add a resolver location using the CLI, run the following command:
ibmcloud dns custom-resolver-location-add RESOLVER_ID --subnet SUBNET_CRN [--enabled true|false] [-i, --instance INSTANCE] [--output FORMAT]
Where:
- RESOLVER_ID is the ID of custom resolver.
- --subnet is the CRN of the subnet.
- --enabled determines whether to enable the resolver location.
- -i, --instance is the instance name or ID. If this is not set, the context instance specified by
dns instance-target INSTANCE
is used instead. - --output specifies output format. Currently, JSON is the only supported format.
Adding a resolver location with the API
To add a custom resolver location using the API, follow these steps:
-
Set up your API environment with the correct variables.
-
Store the following values in variables to be used in the API command:
instance_id
, which is the unique identifier of a service instance.resolver_id
, which is the unique identifier of a custom resolver.X-Correlation-ID
, which is a string that uniquely identifies a request.
-
When all variables are initiated, get the details of your custom resolver:
{ "subnet_crn": "crn:v1:bluemix:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04", "enabled": false }