@@ -29,7 +29,6 @@ your Kubernetes cluster.
2929
3030* 确保 [ Kubernetes DNS] ( /zh-cn/docs/concepts/services-networking/dns-pod-service/ ) 已启用。
3131
32-
3332<!-- steps -->
3433
3534<!--
@@ -38,7 +37,7 @@ your Kubernetes cluster.
3837List the {{< glossary_tooltip text="Deployments" term_id="deployment" >}}
3938in your cluster in the kube-system {{< glossary_tooltip text="namespace" term_id="namespace" >}}:
4039-->
41- ## 确定是否 DNS 水平自动扩缩特性已经启用 {#determining-whether-dns-horizontal-autoscaling-is-already-enabled}
40+ ## 确定是否 DNS 水平自动扩缩特性已经启用 {#determining-whether-dns-horizontal-autoscaling-is-already-enabled}
4241
4342在 kube-system {{< glossary_tooltip text="命名空间" term_id="namespace" >}}中列出集群中的
4443{{< glossary_tooltip text="Deployment" term_id="deployment" >}}:
@@ -53,26 +52,26 @@ The output is similar to this:
5352输出类似如下这样:
5453
5554```
56- NAME READY UP-TO-DATE AVAILABLE AGE
55+ NAME READY UP-TO-DATE AVAILABLE AGE
5756...
58- dns-autoscaler 1/1 1 1 ...
57+ kube- dns-autoscaler 1/1 1 1 ...
5958...
6059```
6160
6261<!--
63- If you see "dns-autoscaler" in the output, DNS horizontal autoscaling is
62+ If you see "kube- dns-autoscaler" in the output, DNS horizontal autoscaling is
6463already enabled, and you can skip to
6564[Tuning autoscaling parameters](#tuning-autoscaling-parameters).
6665-->
67- 如果在输出中看到 “dns-autoscaler”,说明 DNS 水平自动扩缩已经启用,
66+ 如果在输出中看到 “kube- dns-autoscaler”,说明 DNS 水平自动扩缩已经启用,
6867可以跳到[ 调优 DNS 自动扩缩参数] ( #tuning-autoscaling-parameters ) 。
6968
7069<!--
7170## Get the name of your DNS Deployment {#find-scaling-target}
7271
7372List the DNS deployments in your cluster in the kube-system namespace:
7473-->
75- ## 获取 DNS Deployment 的名称 {#find-scaling-target}
74+ ## 获取 DNS Deployment 的名称 {#find-scaling-target}
7675
7776列出集群内 kube-system 命名空间中的 DNS Deployment:
7877
@@ -122,12 +121,12 @@ the name of your Deployment for DNS is coredns, your scale target is Deployment/
122121其中 ` <your-deployment-name> ` 是 DNS Deployment 的名称。
123122例如,如果你的 DNS Deployment 名称是 ` coredns ` ,则你的扩展目标是 Deployment/coredns。
124123
124+ {{< note >}}
125125<!--
126126CoreDNS is the default DNS service for Kubernetes. CoreDNS sets the label
127127`k8s-app=kube-dns` so that it can work in clusters that originally used
128128kube-dns.
129129-->
130- {{< note >}}
131130CoreDNS 是 Kubernetes 的默认 DNS 服务。CoreDNS 设置标签 ` k8s-app=kube-dns ` ,
132131以便能够在原来使用 ` kube-dns ` 的集群中工作。
133132{{< /note >}}
@@ -155,7 +154,7 @@ In the file, replace `<SCALE_TARGET>` with your scale target.
155154Go to the directory that contains your configuration file, and enter this
156155command to create the Deployment:
157156-->
158- 在文件中 ,将 ` <SCALE_TARGET> ` 替换成扩缩目标。
157+ 在此文件中 ,将 ` <SCALE_TARGET> ` 替换成扩缩目标。
159158
160159进入到包含配置文件的目录中,输入如下命令创建 Deployment:
161160
@@ -166,25 +165,25 @@ kubectl apply -f dns-horizontal-autoscaler.yaml
166165<!--
167166The output of a successful command is:
168167-->
169- 一个成功的命令输出是 :
168+ 命令成功执行后的输出为 :
170169
171170```
172- deployment.apps/dns-autoscaler created
171+ deployment.apps/kube- dns-autoscaler created
173172```
174173
175174<!--
176175DNS horizontal autoscaling is now enabled.
177176-->
178- DNS 水平自动扩缩在已经启用了 。
177+ DNS 水平自动扩缩现在已经启用了 。
179178
180179<!--
181180## Tune DNS autoscaling parameters {#tuning-autoscaling-parameters}
182181
183- Verify that the dns-autoscaler {{< glossary_tooltip text="ConfigMap" term_id="configmap" >}} exists:
182+ Verify that the kube- dns-autoscaler {{< glossary_tooltip text="ConfigMap" term_id="configmap" >}} exists:
184183-->
185184## 调优 DNS 自动扩缩参数 {#tuning-autoscaling-parameters}
186185
187- 验证 dns-autoscaler {{< glossary_tooltip text="ConfigMap" term_id="configmap" >}} 是否存在:
186+ 验证 kube- dns-autoscaler {{< glossary_tooltip text="ConfigMap" term_id="configmap" >}} 是否存在:
188187
189188``` shell
190189kubectl get configmap --namespace=kube-system
@@ -198,17 +197,17 @@ The output is similar to this:
198197```
199198NAME DATA AGE
200199...
201- dns-autoscaler 1 ...
200+ kube- dns-autoscaler 1 ...
202201...
203202```
204203
205204<!--
206205Modify the data in the ConfigMap:
207206-->
208- 修改该 ConfigMap 中的数据:
207+ 修改此 ConfigMap 中的数据:
209208
210209``` shell
211- kubectl edit configmap dns-autoscaler --namespace=kube-system
210+ kubectl edit configmap kube- dns-autoscaler --namespace=kube-system
212211```
213212
214213<!--
@@ -225,7 +224,6 @@ Modify the fields according to your needs. The "min" field indicates the
225224minimal number of DNS backends. The actual number of backends is
226225calculated using this equation:
227226-->
228-
229227根据需要修改对应的字段。“min” 字段表明 DNS 后端的最小数量。
230228实际后端的数量通过使用如下公式来计算:
231229
@@ -258,21 +256,21 @@ There are other supported scaling patterns. For details, see
258256There are a few options for tuning DNS horizontal autoscaling. Which option to
259257use depends on different conditions.
260258-->
261- ## 禁用 DNS 水平自动扩缩
259+ ## 禁用 DNS 水平自动扩缩 {#disable-dns-horizontal-autoscaling}
262260
263261有几个可供调优的 DNS 水平自动扩缩选项。具体使用哪个选项因环境而异。
264262
265263<!--
266- ### Option 1: Scale down the dns-autoscaler deployment to 0 replicas
264+ ### Option 1: Scale down the kube- dns-autoscaler deployment to 0 replicas
267265
268266This option works for all situations. Enter this command:
269267-->
270- ### 选项 1:缩容 dns-autoscaler Deployment 至 0 个副本
268+ ### 选项 1:kube- dns-autoscaler Deployment 缩容至 0 个副本
271269
272- 该选项适用于所有场景 。运行如下命令:
270+ 此选项适用于所有场景 。运行如下命令:
273271
274272``` shell
275- kubectl scale deployment --replicas=0 dns-autoscaler --namespace=kube-system
273+ kubectl scale deployment --replicas=0 kube- dns-autoscaler --namespace=kube-system
276274```
277275
278276<!--
@@ -281,7 +279,7 @@ The output is:
281279输出如下所示:
282280
283281```
284- deployment.apps/dns-autoscaler scaled
282+ deployment.apps/kube- dns-autoscaler scaled
285283```
286284
287285<!--
@@ -301,22 +299,22 @@ The output displays 0 in the DESIRED and CURRENT columns:
301299```
302300NAME DESIRED CURRENT READY AGE
303301...
304- dns-autoscaler-6b59789fc8 0 0 0 ...
302+ kube- dns-autoscaler-6b59789fc8 0 0 0 ...
305303...
306304```
307305
308306<!--
309- ### Option 2: Delete the dns-autoscaler deployment
307+ ### Option 2: Delete the kube- dns-autoscaler deployment
310308
311- This option works if dns-autoscaler is under your own control, which means
309+ This option works if kube- dns-autoscaler is under your own control, which means
312310no one will re-create it:
313311-->
314- ### 选项 2:删除 dns-autoscaler Deployment
312+ ### 选项 2:删除 kube- dns-autoscaler Deployment
315313
316- 如果 dns-autoscaler 为你所控制,也就说没有人会去重新创建它,可以选择此选项:
314+ 如果 kube- dns-autoscaler 为你所控制,也就说没有人会去重新创建它,可以选择此选项:
317315
318316``` shell
319- kubectl delete deployment dns-autoscaler --namespace=kube-system
317+ kubectl delete deployment kube- dns-autoscaler --namespace=kube-system
320318```
321319
322320<!--
@@ -325,38 +323,37 @@ The output is:
325323输出内容如下所示:
326324
327325```
328- deployment.apps "dns-autoscaler" deleted
326+ deployment.apps "kube- dns-autoscaler" deleted
329327```
330328
331329<!--
332- ### Option 3: Delete the dns-autoscaler manifest file from the master node
330+ ### Option 3: Delete the kube- dns-autoscaler manifest file from the master node
333331
334- This option works if dns-autoscaler is under control of the (deprecated)
332+ This option works if kube- dns-autoscaler is under control of the (deprecated)
335333[Addon Manager](https://git.k8s.io/kubernetes/cluster/addons/README.md),
336334and you have write access to the master node.
337335-->
336+ ### 选项 3:从主控节点删除 kube-dns-autoscaler 清单文件
338337
339- ### 选项 3:从主控节点删除 dns-autoscaler 清单文件
340-
341- 如果 dns-autoscaler 在[ 插件管理器] ( https://git.k8s.io/kubernetes/cluster/addons/README.md )
342- 的控制之下,并且具有操作 master 节点的写权限,可以使用此选项。
338+ 如果 kube-dns-autoscaler 在[ 插件管理器] ( https://git.k8s.io/kubernetes/cluster/addons/README.md )
339+ 的控制之下,并且具有操作主控节点的写权限,可以使用此选项。
343340
344341<!--
345342Sign in to the master node and delete the corresponding manifest file.
346- The common path for this dns-autoscaler is:
343+ The common path for this kube- dns-autoscaler is:
347344-->
348- 登录到主控节点,删除对应的清单文件。
349- dns-autoscaler 对应的路径一般为:
345+ 登录到主控节点,删除对应的清单文件。
346+ kube- dns-autoscaler 对应的路径一般为:
350347
351348```
352349/etc/kubernetes/addons/dns-horizontal-autoscaler/dns-horizontal-autoscaler.yaml
353350```
354351
355352<!--
356353After the manifest file is deleted, the Addon Manager will delete the
357- dns-autoscaler Deployment.
354+ kube- dns-autoscaler Deployment.
358355-->
359- 当清单文件被删除后,插件管理器将删除 dns-autoscaler Deployment。
356+ 当清单文件被删除后,插件管理器将删除 kube- dns-autoscaler Deployment。
360357
361358<!-- discussion -->
362359
@@ -369,7 +366,7 @@ the DNS service.
369366* An autoscaler Pod runs a client that polls the Kubernetes API server for the
370367number of nodes and cores in the cluster.
371368-->
372- ## 理解 DNS 水平自动扩缩工作原理
369+ ## 理解 DNS 水平自动扩缩工作原理 {#understanding-how-dns-horizontal-autoscaling-works}
373370
374371* cluster-proportional-autoscaler 应用独立于 DNS 服务部署。
375372
@@ -405,7 +402,6 @@ patterns: *linear* and *ladder*.
405402* Read about [Guaranteed Scheduling For Critical Add-On Pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/).
406403* Learn more about the
407404[implementation of cluster-proportional-autoscaler](https://github.com/kubernetes-sigs/cluster-proportional-autoscaler).
408-
409405-->
410406* 阅读[ 为关键插件 Pod 提供的调度保障] ( /zh-cn/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/ ) 。
411407* 进一步了解 [ cluster-proportional-autoscaler 实现] ( https://github.com/kubernetes-sigs/cluster-proportional-autoscaler ) 。
0 commit comments