Following the documentation here, I could set the threshold for container startup like so:
startupProbe:
httpGet:
path: /healthz
port: liveness-port
failureThreshold: 30
periodSeconds: 10
Unfortunately, it seems like startupProbe.failureThreshold is not compatible with our current k8s version (1.12.1):
unknown field "startupProbe" in io.k8s.api.core.v1.Container; if you choose to ignore these errors, turn validation off with --validate=false
Is there a workaround for this? I'd like to give a container a chance of ~40+ minutes to start.
Yes,
startupProbewas introduced with 1.16 - so you cannot use it with Kubernetes 1.12.I am guessing you are defining a
livenessProbe- so the easiest way to get around your problem is to remove thelivenessProbe. Most applications won't need one (some won't even need areadinessProbe). See also this excellent article: Liveness Probes are Dangerous.