mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 06:56:29 +00:00
add kube-dns auto-scalling
This commit is contained in:
@@ -1,7 +1,38 @@
|
|||||||
package addons
|
package addons
|
||||||
|
|
||||||
func GetKubeDNSManifest(clusterDNSServer, clusterDomain string) string {
|
func GetKubeDNSManifest(clusterDNSServer, clusterDomain string) string {
|
||||||
return `
|
return `---
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: kube-dns-autoscaler
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
k8s-app: kube-dns-autoscaler
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: kube-dns-autoscaler
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: autoscaler
|
||||||
|
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
|
||||||
|
- --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":128,"nodesPerReplica":4,"min":1}}
|
||||||
|
- --logtostderr=true
|
||||||
|
- --v=2
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
|
Reference in New Issue
Block a user