Kubelet tuning

This commit is contained in:
Stefan Reimer 2021-03-18 14:31:10 +01:00
parent 3f204b5e04
commit 419d43cf9f
6 changed files with 64 additions and 3 deletions

View File

@ -5,7 +5,8 @@ metadata:
failSwapOn: false
cgroupDriver: cgroupfs
logging:
format: json
# We already have syslog-ng logging json
# format: json
hairpinMode: hairpin-veth
{{- if .Values.systemd }}
resolvConf: /run/systemd/resolve/resolv.conf
@ -22,7 +23,15 @@ featureGates:
CSIMigrationAWS: true
CSIMigrationAWSComplete: true
{{- end }}
# Minimal unit is 50m per pod
podsPerCore: 20
# Basic OS on Ubuntu 20.04 incl. crio
systemReserved:
memory: 256Mi
# This should be dynamic based on number of maxpods and available cores
# https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#memory_cpu
# Below are default minimal for 2 cores and minimum kubelet
kubeReserved:
cpu: 50m
memory: 128m
cpu: 70m
memory: 128Mi
# cpuCFSQuotaPeriod: 10ms

View File

@ -0,0 +1,24 @@
spec:
replicas: {{ ternary 3 1 .Values.clusterHighAvailable }}
template:
spec:
containers:
- name: coredns
resources:
requests:
cpu: 100m
memory: 32Mi
limits:
memory: 128Mi
nodeSelector:
node-role.kubernetes.io/master: ""
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values:
- kube-dns
topologyKey: "kubernetes.io/hostname"

View File

@ -0,0 +1,7 @@
spec:
containers:
- name: etcd
resources:
requests:
cpu: 250m
memory: 192Mi

View File

@ -0,0 +1,7 @@
spec:
containers:
- name: kube-apiserver
resources:
requests:
cpu: 250m
memory: 1Gi

View File

@ -0,0 +1,7 @@
spec:
containers:
- name: kube-controller-manager
resources:
requests:
cpu: 200m
memory: 128Mi

View File

@ -0,0 +1,7 @@
spec:
containers:
- name: kube-scheduler
resources:
requests:
cpu: 100m
memory: 64Mi