After private network access is enabled for the current cluster, TKE will access the cluster through the domain name by default. You need to configure Host
on the access server to perform DNS queries on the private network. If no DNS rules (Host
) are configured, an error "no such host" will be reported when you access the cluster on the access server (by running kubectl get nodes
) as shown below:
In practice, configuring Host
will increase your management labor costs. Therefore, we recommend you use Tencent Cloud's newly launched Private DNS service, which helps you get things done in just three steps.
Private DNS is billed on a pay-as-you-go basis, where the number of private domains and that of DNS requests are billed on a natural day basis. For more information, see Billing Overview.
Currently, Private DNS is not available in all the available regions of TKE. For the list of its available regions, see Use Limits.
To access clusters over the private network in regions not covered by Private DNS, you need to manually configure the Host
. To use Private DNS in those regions, submit a ticket for application.
A container cluster has been created and private network access has been enabled. For details, see Creating a Cluster.
tencent-cloud.com
(domain name allocated by TKE for accessing the cluster). cls-{{clsid}}.css
. A
. Note:You can get the **Host Record and Record Value from Cluster Management > Cluster > Basic Info. Here, Host Record is the domain name in Access Address, and Record Value is the IP address in Private Network Access, as shown below:
- Click Save in the Operation column on the right.
Run the following command to access the cluster again.
kubectl get nodes
When the following result is displayed, the cluster has been successfully accessed, and the node list has been pulled.
Apakah halaman ini membantu?