Browse Source

make sure flanneld got QoS class "Guaranteed" to have lower oom_score_adj

Usually flanneld consumes 5m CPU and 15Mi memory according to "kubectl top".
According to test by @tomdee at https://github.com/coreos/flannel/pull/855#issuecomment-346736586,
50Mi is enough for a 1000 node vxlan cluster.
Yubao Liu 7 years ago
parent
commit
77c8e1297f

+ 7 - 0
Documentation/k8s-manifests/kube-flannel-legacy.yml

@@ -58,6 +58,13 @@ spec:
         args:
         args:
         - --ip-masq
         - --ip-masq
         - --kube-subnet-mgr
         - --kube-subnet-mgr
+        resources:
+          requests:
+            cpu: "100m"
+            memory: "50Mi"
+          limits:
+            cpu: "100m"
+            memory: "50Mi"
         securityContext:
         securityContext:
           privileged: true
           privileged: true
         env:
         env:

+ 7 - 0
Documentation/kube-flannel-aliyun.yml

@@ -114,6 +114,13 @@ spec:
         args:
         args:
         - --ip-masq
         - --ip-masq
         - --kube-subnet-mgr
         - --kube-subnet-mgr
+        resources:
+          requests:
+            cpu: "100m"
+            memory: "50Mi"
+          limits:
+            cpu: "100m"
+            memory: "50Mi"
         securityContext:
         securityContext:
           privileged: true
           privileged: true
         env:
         env:

+ 7 - 0
Documentation/kube-flannel.yml

@@ -124,6 +124,13 @@ spec:
         args:
         args:
         - --ip-masq
         - --ip-masq
         - --kube-subnet-mgr
         - --kube-subnet-mgr
+        resources:
+          requests:
+            cpu: "100m"
+            memory: "50Mi"
+          limits:
+            cpu: "100m"
+            memory: "50Mi"
         securityContext:
         securityContext:
           privileged: true
           privileged: true
         env:
         env:

+ 7 - 0
Documentation/minikube.yml

@@ -59,6 +59,13 @@ spec:
         args:
         args:
         - --ip-masq
         - --ip-masq
         - --kube-subnet-mgr
         - --kube-subnet-mgr
+        resources:
+          requests:
+            cpu: "100m"
+            memory: "50Mi"
+          limits:
+            cpu: "100m"
+            memory: "50Mi"
         securityContext:
         securityContext:
           privileged: true
           privileged: true
         env:
         env: