Skip to main content

Update DNS servers

PUT 

/api/node/:hostname/network/dns

Update the system's DNS server configuration.

Request

Path Parameters

    hostname stringrequired

    Possible values: non-empty

    Target agent hostname, reserved routing value (_any, _all), or label selector (key:value).

Body

required

    servers string[]

    New list of DNS servers to configure.

    search_domains string[]

    New list of search domains to configure.

    interface_name stringrequired

    The name of the network interface to apply DNS configuration to. Accepts alphanumeric names or @fact. references.

    override_dhcp boolean

    When true, disables DHCP-provided DNS servers so only the configured servers are used. When false or omitted, DHCP DNS servers are merged alongside the configured ones (default Netplan behavior).

Responses

DNS servers update successfully accepted.

Schema

    job_id uuid

    The job ID used to process this request.

    results

    object[]

    required

  • Array [

  • hostname stringrequired
    status stringrequired

    Possible values: [ok, failed, skipped]

    changed boolean

    Whether the DNS configuration was actually modified.

    error string
  • ]

Loading...