Change:
dns-horizontal- kube-dns-autoscaler dns-autoscaler 2
/language zh
please describe the issue in English
page related to the issue:
/triage needs-information
Translate to English: The kube-dns-autoscaler used in dns-horizontal- and the dns-autoscaler used in subsequent commands are confused and out of sync. It seems that the English version also has this problem. /triage accepted /kind bug /retitle Inconsistent name in the DNS horizontal autoscaling example
/language en
/assign

Discussion:
The output is similar to this: <del> NAME                      READY   UP-TO-DATE   AVAILABLE   AGE </del> <ins> NAME                   READY   UP-TO-DATE   AVAILABLE   AGE </ins> ... <del> dns-autoscaler            1/1     1            1           ... </del> <ins> kube-dns-autoscaler    1/1     1            1           ... </ins> ... <del> If you see "dns-autoscaler" in the output, DNS horizontal autoscaling is </del> <ins> If you see "kube-dns-autoscaler" in the output, DNS horizontal autoscaling is </ins> already enabled, and you can skip to [Tuning autoscaling parameters](#tuning-autoscaling-parameters).

The output of a successful command is: <del> deployment.apps/dns-autoscaler created </del> <ins> deployment.apps/kube-dns-autoscaler created </ins> DNS horizontal autoscaling is now enabled. ## Tune DNS autoscaling parameters {#tuning-autoscaling-parameters} <del> Verify that the dns-autoscaler {{< glossary_tooltip text="ConfigMap" term_id="configmap" >}} exists: </del> <ins> Verify that the kube-dns-autoscaler {{< glossary_tooltip text="ConfigMap" term_id="configmap" >}} exists: </ins> ```shell kubectl get configmap --namespace=kube-system

NAME                  DATA      AGE ... <del> dns-autoscaler        1         ... </del> <ins> kube-dns-autoscaler   1         ... </ins> ... Modify the data in the ConfigMap: ```shell <del> kubectl edit configmap dns-autoscaler --namespace=kube-system </del> <ins> kubectl edit configmap kube-dns-autoscaler --namespace=kube-system </ins> ``` Look for this line:

There are a few options for tuning DNS horizontal autoscaling. Which option to use depends on different conditions. <del> ### Option 1: Scale down the dns-autoscaler deployment to 0 replicas </del> <ins> ### Option 1: Scale down the kube-dns-autoscaler deployment to 0 replicas </ins> This option works for all situations. Enter this command: ```shell <del> kubectl scale deployment --replicas=0 dns-autoscaler --namespace=kube-system </del> <ins> kubectl scale deployment --replicas=0 kube-dns-autoscaler --namespace=kube-system </ins> ``` The output is: <del> deployment.apps/dns-autoscaler scaled </del> <ins> deployment.apps/kube-dns-autoscaler scaled </ins> Verify that the replica count is zero:

The output displays 0 in the DESIRED and CURRENT columns: <del> NAME                                 DESIRED   CURRENT   READY   AGE </del> <ins> NAME                                  DESIRED   CURRENT   READY   AGE </ins> ... <del> dns-autoscaler-6b59789fc8            0         0         0       ... </del> <ins> kube-dns-autoscaler-6b59789fc8        0         0         0       ... </ins> ... <del> ### Option 2: Delete the dns-autoscaler deployment </del> <ins> ### Option 2: Delete the kube-dns-autoscaler deployment </ins> <del> This option works if dns-autoscaler is under your own control, which means </del> <ins> This option works if kube-dns-autoscaler is under your own control, which means </ins> no one will re-create it: ```shell <del> kubectl delete deployment dns-autoscaler --namespace=kube-system </del> <ins> kubectl delete deployment kube-dns-autoscaler --namespace=kube-system </ins> ``` The output is: <del> deployment.apps "dns-autoscaler" deleted </del> <ins> deployment.apps "kube-dns-autoscaler" deleted </ins> <del> ### Option 3: Delete the dns-autoscaler manifest file from the master node </del> <ins> ### Option 3: Delete the kube-dns-autoscaler manifest file from the master node </ins> <del> This option works if dns-autoscaler is under control of the (deprecated) </del> <ins> This option works if kube-dns-autoscaler is under control of the (deprecated) </ins> [Addon Manager](https://git.k8s.io/kubernetes/cluster/addons/README.md), and you have write access to the master node. Sign in to the master node and delete the corresponding manifest file. <del> The common path for this dns-autoscaler is: </del> <ins> The common path for this kube-dns-autoscaler is: </ins> /etc/kubernetes/addons/dns-horizontal-autoscaler/dns-horizontal-autoscaler.yaml After the manifest file is deleted, the Addon Manager will delete the <del> dns-autoscaler Deployment. </del> <ins> kube-dns-autoscaler Deployment. </ins>