container startup probe does not get executed

9/11/2020

I have defined a startup probe for the container and deployed it in openshift. openshift version is 3.11 it seems the startup probe does not get executed.

startupProbe:
  exec:
    command:
    - /bin/sh
    - -c
    - echo "start up probe" > /tmp/startup
  initialDelaySeconds: 30
  timeoutSeconds: 300
  failureThreshold: 1

what i expect from the below definition of startup probe is to have the file /tmp/startup created. but when i log to the POD to check i do not see any file created.

-- dsingh
kubernetes
openshift

1 Answer

9/12/2020

You cannot use "startupProbe" on OpenShift 3.11 which is based on Kubernetes 1.11, because the feature provides from Kubernetes 1.18 (as beta). So you need OpenShift 4.5(incorporated with Kubernetes 1.18) for using the feature by default at least. Refer Feature Gates.

Feature      	Default	  Stage	  Since	  Until
-----------------------------------------------------------
StartupProbe	false	  Alpha	  1.16	  1.17	
StartupProbe	true	  Beta	  1.18
-- Daein Park
Source: StackOverflow