From b739a5ce5eabc385edb641c29263ba18442583e7 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Wed, 13 Feb 2019 17:56:59 +0000 Subject: [PATCH] Add CPU and memory requests to example Kubernetes manifests If you don't specify, the default is typically 0 which (a) gives the Kubernetes scheduler a false idea of expected usage and (b) makes the Linux scheduler penalise the Scope processes under contention. For best results adjust the figures here after observing actual usage on your cluster. --- examples/k8s/deploy.yaml | 4 ++++ examples/k8s/ds.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/examples/k8s/deploy.yaml b/examples/k8s/deploy.yaml index b015174c5..5007de179 100644 --- a/examples/k8s/deploy.yaml +++ b/examples/k8s/deploy.yaml @@ -33,3 +33,7 @@ spec: ports: - containerPort: 4040 protocol: TCP + resources: + requests: + cpu: 200m + memory: 200Mi diff --git a/examples/k8s/ds.yaml b/examples/k8s/ds.yaml index ad87034b3..dfb4325f5 100644 --- a/examples/k8s/ds.yaml +++ b/examples/k8s/ds.yaml @@ -38,6 +38,10 @@ spec: fieldPath: spec.nodeName image: weaveworks/scope:1.10.2 imagePullPolicy: IfNotPresent + resources: + requests: + cpu: 100m + memory: 100Mi securityContext: privileged: true volumeMounts: