Created
March 15, 2017 23:16
-
-
Save zzh8829/d5d53253310dee172dcc6091a7ea44c8 to your computer and use it in GitHub Desktop.
kubeadm lower resource limit
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
From 62b5e2f5fcf407783245ce7f03dc33f70d0f3200 Mon Sep 17 00:00:00 2001 | |
From: Zihao Zhang <zzh8829@gmail.com> | |
Date: Wed, 15 Mar 2017 15:26:30 -0700 | |
Subject: [PATCH] Lower Limits | |
--- | |
cmd/kubeadm/app/master/manifests.go | 2 +- | |
cmd/kubeadm/app/phases/addons/manifests.go | 6 ++---- | |
2 files changed, 3 insertions(+), 5 deletions(-) | |
diff --git a/cmd/kubeadm/app/master/manifests.go b/cmd/kubeadm/app/master/manifests.go | |
index 0af22fa..402451a 100644 | |
--- a/cmd/kubeadm/app/master/manifests.go | |
+++ b/cmd/kubeadm/app/master/manifests.go | |
@@ -244,7 +244,7 @@ func k8sVolumeMount() api.VolumeMount { | |
func componentResources(cpu string) api.ResourceRequirements { | |
return api.ResourceRequirements{ | |
- Requests: api.ResourceList{ | |
+ Limits: api.ResourceList{ | |
api.ResourceName(api.ResourceCPU): resource.MustParse(cpu), | |
}, | |
} | |
diff --git a/cmd/kubeadm/app/phases/addons/manifests.go b/cmd/kubeadm/app/phases/addons/manifests.go | |
index a2f5d01..615cdee 100644 | |
--- a/cmd/kubeadm/app/phases/addons/manifests.go | |
+++ b/cmd/kubeadm/app/phases/addons/manifests.go | |
@@ -135,9 +135,7 @@ spec: | |
# "burstable" category so the kubelet doesn't backoff from restarting it. | |
limits: | |
memory: 170Mi | |
- requests: | |
cpu: 100m | |
- memory: 70Mi | |
livenessProbe: | |
httpGet: | |
path: /healthcheck/kubedns | |
@@ -211,9 +209,9 @@ spec: | |
protocol: TCP | |
# see: https://github.com/kubernetes/kubernetes/issues/29055 for details | |
resources: | |
- requests: | |
+ limits: | |
cpu: 150m | |
- memory: 20Mi | |
+ memory: 200Mi | |
volumeMounts: | |
- name: kube-dns-config | |
mountPath: /etc/k8s/dns/dnsmasq-nanny | |
-- | |
2.10.1 (Apple Git-78) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment