The initialDelaySeconds tells Kubernetes to wait this many seconds after the container starts before running the first probe. This helps avoid false failures during container startup.
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 2The periodSeconds defines how often the probe runs after the first probe. Here, it is set to 5 seconds, so the probe runs every 5 seconds.
timeoutSeconds to respond?readinessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3If the probe does not respond within timeoutSeconds, Kubernetes treats the probe as failed and takes action based on the probe type.
initialDelaySeconds: 5, periodSeconds: 2, and timeoutSeconds: 1. The container takes about 10 seconds to start serving requests. What is the most likely cause?The container needs about 10 seconds to be ready, but the probe starts after only 5 seconds. This causes early probe failures and restarts.
livenessProbe:
tcpSocket:
port: 5432
initialDelaySeconds: ?
periodSeconds: ?
timeoutSeconds: ?Setting initialDelaySeconds longer than startup time avoids false failures. Longer periodSeconds and timeoutSeconds allow stable checks without too frequent probes.