-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Deploy kube-dns with cluster-proportional-autoscaler #33239
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Copyright 2016 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: kube-dns-autoscaler | ||
namespace: kube-system | ||
labels: | ||
k8s-app: kube-dns-autoscaler | ||
kubernetes.io/cluster-service: "true" | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
k8s-app: kube-dns-autoscaler | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DNS is marked "critical" - should this be, also? What happens if the cluster is full and this is not running? I guess as the cluster scales up, it will have opportunities to run. I'd still consider it critical |
||
annotations: | ||
scheduler.alpha.kubernetes.io/critical-pod: '' | ||
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]' | ||
spec: | ||
containers: | ||
- name: autoscaler | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you don't set cpu/memory request you will get the crappy defaults, is this ok? suggest setting approximates from at least running this and using some tool like top (the more scientific the better of course) |
||
image: gcr.io/google_containers/cluster-proportional-autoscaler-amd64:1.0.0 | ||
resources: | ||
requests: | ||
cpu: "20m" | ||
memory: "10Mi" | ||
command: | ||
- /cluster-proportional-autoscaler | ||
- --namespace=kube-system | ||
- --configmap=kube-dns-autoscaler | ||
- --mode=linear | ||
# Should keep target in sync with cluster/addons/dns/skydns-rc.yaml.base | ||
- --target=ReplicationController/kube-dns-v20 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The target will need to be changed whenever the name of the dns rc changes. can you add a comment to the DNS RC that points people to this file so that we remember to update them at the same time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, will do that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the changeover to deployments is finished, this gets better There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. an alternative would be a selector here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't forget to change this after your other pr |
||
# When cluster is using large nodes(with more cores), "coresPerReplica" should dominate. | ||
# If using small nodes, "nodesPerReplica" should dominate. | ||
- --default-params={"linear":{"coresPerReplica":256,"nodesPerReplica":16,"min":1}} | ||
- --logtostderr=true | ||
- --v=2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,9 @@ DNS_SERVER_IP="${KUBE_DNS_SERVER_IP:-10.0.0.10}" | |
DNS_DOMAIN="${KUBE_DNS_DOMAIN:-cluster.local}" | ||
DNS_REPLICAS=1 | ||
|
||
# Optional: Enable DNS horizontal autoscaler | ||
ENABLE_DNS_HORIZONTAL_AUTOSCALER="${KUBE_ENABLE_DNS_HORIZONTAL_AUTOSCALER:-true}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you also need to update the gke configs: https://github.com/kubernetes/kubernetes/blob/master/cluster/gke/config-common.sh#L39 (follow up pr is fine if you prefer but I guess you need to specify limits in this one anyway). |
||
|
||
# Optional: Install cluster docker registry. | ||
ENABLE_CLUSTER_REGISTRY="${KUBE_ENABLE_CLUSTER_REGISTRY:-false}" | ||
CLUSTER_REGISTRY_DISK="${CLUSTER_REGISTRY_PD:-${INSTANCE_PREFIX}-kube-system-kube-registry}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious: why make a new dir for this, rather than dropping it in with DNS files?