Last active
October 31, 2018 15:32
-
-
Save deiwin/4528e042411f024dc1549f454616f3a3 to your computer and use it in GitHub Desktop.
EKS kube-dns autoscaler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: kube-dns-autoscaler | |
namespace: kube-system | |
labels: | |
k8s-app: kube-dns-autoscaler | |
spec: | |
selector: | |
matchLabels: | |
k8s-app: kube-dns-autoscaler | |
template: | |
metadata: | |
labels: | |
k8s-app: kube-dns-autoscaler | |
spec: | |
serviceAccountName: kube-dns-autoscaler | |
containers: | |
- name: autoscaler | |
image: k8s.gcr.io/cluster-proportional-autoscaler-amd64:1.1.1 | |
resources: | |
requests: | |
cpu: "20m" | |
memory: "10Mi" | |
command: | |
- /cluster-proportional-autoscaler | |
- --namespace=kube-system | |
- --configmap=kube-dns-autoscaler | |
- --target=Deployment/kube-dns | |
# 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,"preventSinglePointFailure":true}} | |
- --logtostderr=true | |
- --v=2 | |
--- | |
kind: ServiceAccount | |
apiVersion: v1 | |
metadata: | |
name: kube-dns-autoscaler | |
namespace: kube-system | |
--- | |
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: cluster-proportional-autoscaler | |
rules: | |
- apiGroups: [""] | |
resources: ["nodes"] | |
verbs: ["list", "watch"] | |
- apiGroups: [""] | |
resources: ["replicationcontrollers/scale"] | |
verbs: ["get", "update"] | |
- apiGroups: ["extensions"] | |
resources: ["deployments/scale", "replicasets/scale"] | |
verbs: ["get", "update"] | |
- apiGroups: [""] | |
resources: ["configmaps"] | |
verbs: ["get", "create"] | |
--- | |
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: kube-dns-autoscaler | |
subjects: | |
- kind: ServiceAccount | |
name: kube-dns-autoscaler | |
namespace: kube-system | |
roleRef: | |
kind: ClusterRole | |
name: cluster-proportional-autoscaler | |
apiGroup: rbac.authorization.k8s.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment