Skip to content

Latest commit

 

History

History
109 lines (75 loc) · 3.83 KB

cr-add.md

File metadata and controls

109 lines (75 loc) · 3.83 KB
copyright lastupdated keywords subcollection
years
2021, 2024
2024-10-25
dns-svcs

{{site.data.keyword.attribute-definition-list}}

Configuring a custom resolver

{: #ui-create-cr}

You can add a custom resolver in {{site.data.keyword.dns_full}} by using the UI, CLI, or API. {: shortdesc}

Creating a custom resolver in the UI

{: #create-cr-ui} {: ui}

To add a custom resolver in {{site.data.keyword.dns_short}}, follow these steps:

Each VPC can have only one custom resolver. {: note}

  1. Navigate to Custom resolvers in the {{site.data.keyword.dns_short}} navigation menu.

  2. Click Create custom resolver.

  3. Enter a name and description for your custom resolver.

  4. Select a region from the list menu.

  5. Select a VPC from the list menu.

  6. Select a subnet from the list menu.

    To achieve high availability, you must provide a minimum of two subnets. You can configure a maximum of three locations within the same subnet, or in different subnets. {: important}

  7. Click Add+ if you want to add another subnet.

  8. Click Create.

    The custom resolver details view appears, where you can manage custom resolver settings.

Creating a custom resolver without high availability

{: #cr-add-no-ha}

If you want to create a custom resolver without high availability, you must manually delete the second subnet field by clicking the trashcan icon next to the second subnet.

Delete second subnet{: caption="Delete the second subnet to remove high availability function" caption-side="bottom"}

Creating a custom resolver from the CLI

{: #cli-create-cr} {: cli}

To create a custom resolver using the CLI, run the following command:

ibmcloud dns custom-resolver-create --name NAME --location LOCATION1 --location LOCATION2 [-description DESCRIPTION] [-i, --instance INSTANCE] [--output FORMAT]

Where:

  • -n, --name is the name of the custom resolver.
  • -d, --description is the descriptive text of the custom resolver.
  • --location is the location where the custom resolver is running. The location subnet CRN is required. For example: --location subnet1,enable --location subnet2,disable
  • -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.

To create a custom resolver without high availability, run the command with [-f, --force]:

ibmcloud dns custom-resolver-create --name NAME [--location LOCATION1] [--location LOCATION2] [-description DESCRIPTION] [-f, --force] [-i, --instance INSTANCE] [--output FORMAT]

Where:

  • -f, --force allows for creating custom resolver with fewer than 2 locations.

Create a custom resolver with the API

{: #api-create-cr} {: api}

To add a custom resolver using the API, follow these steps:

  1. Set up your API environment with the correct variables.
  2. Store the following values in variables to be used in the API command:
    • instance_id, which is the unique identifier of a service instance.
    • X-Correlation-ID, which is a string that uniquely identifies a request.
  3. When all variables are initiated, add your custom resolver:
{
  "name": "my-resolver",
  "description": "custom resolver",
  "locations": [
    {
      "subnet_crn": "crn:v1:bluemix:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04",
      "enabled": false
    }
  ]
}

{: codeblock}

Next steps

{: #next-steps-create-cr}