Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce coredns replicas from 2 to 1 #8552

Merged
merged 3 commits into from
Jun 25, 2020
Merged

Conversation

priyawadhwa
Copy link

@priyawadhwa priyawadhwa commented Jun 25, 2020

This is an easy way to improve overhead -- we don't need 2 coredns pods running by default. If a user wants more, they can easily scale the deployment up with kubectl

it won't make a huge difference alone, but in combination with some other PRs I'll be opening it should get us to our goal of 20% reduction

#5682

This is an easy way to improve overhead, and users can always scale this back up if they need to.
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 25, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: priyawadhwa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 25, 2020
@priyawadhwa
Copy link
Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jun 25, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
docker Driver

pkg/addons/kubectl.go Outdated Show resolved Hide resolved
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved with nit comment

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 25, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [64.331525424 63.537736443 63.410403212]
Average time for minikube: 63.75988835966666

Times for Minikube (PR 8552): [67.682349452 62.92510660999999 64.340755203]
Average time for Minikube (PR 8552): 64.98273708833334

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8552) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.0-beta.0 on   |  0.057173 |           0.060681 |
| Debian 9.11                    |           |                    |
| * Using the kvm2 driver based  |  0.017941 |           0.021521 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.003459 |           0.003036 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 40.868910 |          41.173537 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.3 | 21.115045 |          21.853736 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  1.104534 |           1.350334 |
| components...                  |           |                    |
| * Enabled addons:              |  0.516511 |           0.438355 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.073276 |           0.075338 |
| configured to use "minikube"   |           |                    |
|                                |  0.003041 |           0.006197 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [27.556391168 25.45038073 25.865965807000002]
Average time for minikube: 26.29091256833333

Times for Minikube (PR 8552): [26.444226114 27.913836233 24.902068095999997]
Average time for Minikube (PR 8552): 26.420043480999997

Averages Time Per Log

+----------------------------------------+-----------+--------------------+
|                  LOG                   | MINIKUBE  | MINIKUBE (PR 8552) |
+----------------------------------------+-----------+--------------------+
| * minikube v1.12.0-beta.0 on           |  0.071826 |           0.069737 |
| Debian 9.11                            |           |                    |
| * Using the docker driver              |  0.002515 |           0.002367 |
| based on existing profile              |           |                    |
| * Starting control plane node          |  0.054235 |           0.054796 |
| minikube in cluster minikube           |           |                    |
| * Creating docker container            |  7.468810 |           7.511672 |
| (CPUs=2, Memory=3700MB) ...            |           |                    |
| * Preparing Kubernetes v1.18.3         |  0.114456 |           0.143771 |
| on Docker 19.03.2 ...                  |           |                    |
|   -                                    | 17.657167 |          17.390920 |
| kubeadm.pod-network-cidr=10.244.0.0/16 |           |                    |
| * Verifying Kubernetes                 |  0.733734 |           1.171987 |
| components...                          |           |                    |
| * Enabled addons:                      |  0.124678 |           0.002651 |
| default-storageclass,                  |           |                    |
| storage-provisioner                    |           |                    |
| * Done! kubectl is now                 |  0.059750 |           0.066321 |
| configured to use "minikube"           |           |                    |
|                                        |  0.003743 |           0.005822 |
+----------------------------------------+-----------+--------------------+

kubectl := kapi.KubectlBinaryPath(cc.KubernetesConfig.KubernetesVersion)
cmd := exec.Command("sudo", "KUBECONFIG=/var/lib/minikube/kubeconfig", kubectl, "scale", "deployment", "--replicas=1", "coredns", "-n=kube-system")
if _, err := runner.RunCmd(cmd); err != nil {
glog.Infof("unable to scale coredns replicas to 1: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be warningf

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [63.504781111999996 64.753744345 59.474525834]
Average time for minikube: 62.57768376366666

Times for Minikube (PR 8552): [67.268643208 61.53745453399999 63.500490506000006]
Average time for Minikube (PR 8552): 64.10219608266667

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8552) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.0-beta.0 on   |  0.058623 |           0.057760 |
| Debian 9.11                    |           |                    |
| * Using the kvm2 driver based  |  0.018455 |           0.021017 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.004758 |           0.004014 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 38.958011 |          40.621331 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.3 | 21.510922 |          21.147216 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  1.231935 |           1.714688 |
| components...                  |           |                    |
| * Enabled addons:              |  0.723662 |           0.462663 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.067401 |           0.070298 |
| configured to use "minikube"   |           |                    |
|                                |  0.003918 |           0.003210 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [25.176757638999998 25.314086788000004 24.503288686999994]
Average time for minikube: 24.998044371333332

Times for Minikube (PR 8552): [25.677865813 24.911623059 25.185663239000004]
Average time for Minikube (PR 8552): 25.258384037

Averages Time Per Log

+----------------------------------------+-----------+--------------------+
|                  LOG                   | MINIKUBE  | MINIKUBE (PR 8552) |
+----------------------------------------+-----------+--------------------+
| * minikube v1.12.0-beta.0 on           |  0.069834 |           0.070077 |
| Debian 9.11                            |           |                    |
| * Using the docker driver              |  0.003019 |           0.002563 |
| based on existing profile              |           |                    |
| * Starting control plane node          |  0.057482 |           0.062270 |
| minikube in cluster minikube           |           |                    |
| * Creating docker container            |  7.313768 |           7.324497 |
| (CPUs=2, Memory=3700MB) ...            |           |                    |
| * Preparing Kubernetes v1.18.3         |  0.111982 |           0.119152 |
| on Docker 19.03.2 ...                  |           |                    |
|   -                                    | 16.294663 |          16.803046 |
| kubeadm.pod-network-cidr=10.244.0.0/16 |           |                    |
| * Verifying Kubernetes                 |  0.789713 |           0.787095 |
| components...                          |           |                    |
| * Enabled addons:                      |  0.291046 |           0.022262 |
| default-storageclass,                  |           |                    |
| storage-provisioner                    |           |                    |
| * Done! kubectl is now                 |  0.062744 |           0.063760 |
| configured to use "minikube"           |           |                    |
|                                        |  0.003793 |           0.003662 |
+----------------------------------------+-----------+--------------------+

@priyawadhwa priyawadhwa merged commit a115db6 into kubernetes:master Jun 25, 2020
@priyawadhwa priyawadhwa deleted the coredns branch June 25, 2020 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants