From 03bb1b9770457ccb66f95102095be6b9520bdede Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 6 May 2020 09:53:29 +0200 Subject: [PATCH] coredns: readiness- and livenessProbe tweaks The readinessProbe was delaying the startup of coredns greatly. This change brings startup times from ~15s to ~2-3s when testing locally. A reduction of ~80%. The livenessProbe would also take potentially more than a minute to be declared unhealthy and restarted which is now tweaked down to about 30 seconds For more information about the probes, see: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes --- manifests/coredns.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/manifests/coredns.yaml b/manifests/coredns.yaml index f53b65807c..66305ea049 100644 --- a/manifests/coredns.yaml +++ b/manifests/coredns.yaml @@ -143,18 +143,20 @@ spec: port: 8080 scheme: HTTP initialDelaySeconds: 60 - timeoutSeconds: 5 + periodSeconds: 10 + timeoutSeconds: 1 successThreshold: 1 - failureThreshold: 5 + failureThreshold: 3 readinessProbe: httpGet: path: /ready port: 8181 scheme: HTTP - initialDelaySeconds: 10 - timeoutSeconds: 5 + initialDelaySeconds: 0 + periodSeconds: 2 + timeoutSeconds: 1 successThreshold: 1 - failureThreshold: 5 + failureThreshold: 3 dnsPolicy: Default volumes: - name: config-volume