Configuring Kubernetes DNS and discovery parameters

You can set a custom DNS nameserver and discovery URL for Kubernetes clusters. The default DNS nameserver is 8.8.8.8. The discovery URL is used by Kubernetes to discover members of the etcd cluster. By default, Kubernetes uses the public discovery service at https://discovery.etcd.io and generates a unique URL for each cluster.

To change the DNS nameserver

Use the following command:

vinfra service compute k8saas defaults set --dns-nameserver <dns-nameserver> <version>
--dns-nameserver <dns-nameserver>
The DNS nameserver to be used for Kubernetes clusters.
<version>
Kubernetes version to apply new defaults for.

For example, to set the DNS nameserver to 1.1.1.1 and apply this change for all of the supported Kubernetes versions, run:

# vinfra service compute k8saas defaults set --dns-nameserver 1.1.1.1

To set this DNS nameserver only for version 1.24.3, append the version number to the command:

# vinfra service compute k8saas defaults set --dns-nameserver 1.1.1.1 v1.24.3

To change the discovery URL

Use the following command:

vinfra service compute k8saas defaults set --discovery-url <discovery-url> <version>
--discovery-url <discovery-url>
Specifies a custom delivery URL for node discovery.
<version>
Kubernetes version to apply new defaults for.

For example, to set the discovery URL to medium and apply this change for all of the supported Kubernetes versions, run:

# vinfra service compute k8saas defaults set --discovery-url my.discovery.url

To set this flavor only for version 1.24.3, append the version number to the command:

# vinfra service compute k8saas defaults set --discovery-url my.discovery.url v1.24.3