tencent cloud

Tencent Kubernetes Engine

Release Notes and Announcements
Release Notes
Announcements
Release Notes
Product Introduction
Overview
Strengths
Architecture
Scenarios
Features
Concepts
Native Kubernetes Terms
Common High-Risk Operations
Regions and Availability Zones
Service Regions and Service Providers
Open Source Components
Purchase Guide
Purchase Instructions
Purchase a TKE General Cluster
Purchasing Native Nodes
Purchasing a Super Node
Getting Started
Beginner’s Guide
Quickly Creating a Standard Cluster
Examples
Container Application Deployment Check List
Cluster Configuration
General Cluster Overview
Cluster Management
Network Management
Storage Management
Node Management
GPU Resource Management
Remote Terminals
Application Configuration
Workload Management
Service and Configuration Management
Component and Application Management
Auto Scaling
Container Login Methods
Observability Configuration
Ops Observability
Cost Insights and Optimization
Scheduler Configuration
Scheduling Component Overview
Resource Utilization Optimization Scheduling
Business Priority Assurance Scheduling
QoS Awareness Scheduling
Security and Stability
TKE Security Group Settings
Identity Authentication and Authorization
Application Security
Multi-cluster Management
Planned Upgrade
Backup Center
Cloud Native Service Guide
Cloud Service for etcd
TMP
TKE Serverless Cluster Guide
TKE Registered Cluster Guide
Use Cases
Cluster
Serverless Cluster
Scheduling
Security
Service Deployment
Network
Release
Logs
Monitoring
OPS
Terraform
DevOps
Auto Scaling
Containerization
Microservice
Cost Management
Hybrid Cloud
AI
Troubleshooting
Disk Full
High Workload
Memory Fragmentation
Cluster DNS Troubleshooting
Cluster kube-proxy Troubleshooting
Cluster API Server Inaccessibility Troubleshooting
Service and Ingress Inaccessibility Troubleshooting
Common Service & Ingress Errors and Solutions
Engel Ingres appears in Connechtin Reverside
CLB Ingress Creation Error
Troubleshooting for Pod Network Inaccessibility
Pod Status Exception and Handling
Authorizing Tencent Cloud OPS Team for Troubleshooting
CLB Loopback
API Documentation
History
Introduction
API Category
Making API Requests
Elastic Cluster APIs
Resource Reserved Coupon APIs
Cluster APIs
Third-party Node APIs
Relevant APIs for Addon
Network APIs
Node APIs
Node Pool APIs
TKE Edge Cluster APIs
Cloud Native Monitoring APIs
Scaling group APIs
Super Node APIs
Other APIs
Data Types
Error Codes
TKE API 2022-05-01
FAQs
TKE General Cluster
TKE Serverless Cluster
About OPS
Hidden Danger Handling
About Services
Image Repositories
About Remote Terminals
Event FAQs
Resource Management
Service Agreement
TKE Service Level Agreement
TKE Serverless Service Level Agreement
Contact Us
Glossary

DNSAutoscaler

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-04-03 11:35:07

Overview

Add-on Description

DNSAutoscaler is an add-on for DNS horizontal auto scaling. It obtains the number of nodes and cores of a cluster through a Deployment and then automatically scales the number of DNS replicas according to preset scaling policies. Two scaling modes are supported: Linear mode and Ladder mode.

Linear Mode

Sample ConfigMap configuration is as follows:
data:
linear: |-
{
"coresPerReplica": 2,
"nodesPerReplica": 1,
"min": 1,
"max": 100,
"preventSinglePointFailure": true
}
Formula for calculating the number of target replicas: replicas = max(ceil(cores × 1/coresPerReplica) , ceil(nodes × 1/nodesPerReplica))
replicas = min(replicas, max)
replicas = max(replicas, min)

Ladder Mode

Sample ConfigMap configuration is as follows:
data:
ladder: |-
{
"coresToReplicas":
[
[ 1, 1 ],
[ 64, 3 ],
[ 512, 5 ],
[ 1024, 7 ],
[ 2048, 10 ],
[ 4096, 15 ]
],
"nodesToReplicas":
[
[ 1, 1 ],
[ 2, 2 ]
]
}
Calculating the quantity of target replicas: Assume that the above configuration is applied in a cluster with 100 nodes and 400 cores, then: nodesToReplicas = 2 (100>2), coresToReplicas = 3 (64<400<512), the greater value of the two is 3, so replica = 3.

Kubernetes objects deployed in a cluster

Kubernetes Object Name
Type
Requested Resource
Namespace
tke-dns-autoscaler
Deployment
20 M CPU and 10 Mi memory per node
kube-system
dns-autoscaler
ConfigMap
-
kube-system
tke-dns-autoscale
ServiceAccount
-
kube-system
tke-dns-autoscaler
ClusterRole
-
kube-system
tke-dns-autoscaler
ClusterRoleBinding
-
kube-system

Limits

Only supported in Kubernetes clusters of version 1.8 or above.
The workload of the DNS server in the cluster should be Deployment or CoreDNS.

Notes

During CoreDNS horizontal scaling, some CoreDNS replicas may be unavailable for a period of time. We recommend that you optimize related configurations to maximize the DNS service availability. For more information, see Configuring Smooth Upgrade.

Component Permission Description

Permission Description

The permission of this component is the minimal dependency required for the current feature to operate.

Permission Scenarios

Feature
Involved Object
Involved Operation Permission
Monitoring changes in node resources within the cluster
node
list/watch
Modifying the number of coredns replicas deployed by the deployment
replicationcontrollers/scale, deployments/scale, and replicasets/scale
get/update
Retrieving parameter configurations from the configmap. In the absence of configured parameters, a configmap with default parameters will be created.
configmap
get/create

Permission Definition

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: tke-dns-autoscaler
rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- replicationcontrollers/scale
verbs:
- get
- update
- apiGroups:
- extensions
- apps
resources:
- deployments/scale
- replicasets/scale
verbs:
- get
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- create

How to Use

1. Log in to the TKE console and select Cluster in the left sidebar.
2. On the Cluster management page, click the ID of the target cluster to go to the cluster details page.
3. In the left sidebar, click Add-on management to go to the Add-on list page.
4. On the Add-on list page, click Create. On the Create add-on page, select DNSAutoscaler. The default scaling configuration of this add-on is as follows:
data:
ladder: |-
{
"coresToReplicas":
[
[ 1, 1 ],
[ 128, 3 ],
[ 512, 4 ]
],
"nodesToReplicas":
[
[ 1, 1 ],
[ 2, 2 ]
]
}
After the add-on is created successfully, you can modify its configuration by modifying configmap/tke-dns-autoscaler under the kube-system namespace. For more information about the configuration, see the official documentation.
5. Click Done.

Parameter Description

Parameter
Description
Type
Default Value
global.image.host
Image repository address
string
ccr.ccs.tencentyun.com
global.podSpec.tolerations
Additional toleration configurations (appended after the default CriticalAddonsOnly)
list
[]
global.podSpec.priorityClassName
Pod PriorityClass name
string
system-cluster-critical
autoscaler.replicas
Number of replicas of the autoscaler itself
int
1
autoscaler.resources.requests.cpu
CPU request
string
20m
autoscaler.resources.requests.memory
memory request
string
10Mi
autoscaler.resources.limits.cpu
CPU limit. Leave empty to not set.
string
""
autoscaler.resources.limits.memory
Memory limit. Leave empty to not set.
string
""

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan