The Tomcat server bundled inside the pod is actually taking around 10 mins to start, but the pod's status is getting changed to running withing few seconds. Can we control the status of the pod until the actual application is started?
You will need you combination of startup probe and readiness probe for your use case.
Example :
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 1
successThreshold: 1
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 2
failureThreshold: 1
successThreshold: 1
startupProbe:
tcpSocket:
port: 8080
failureThreshold: 30
periodSeconds: 20
The application will have a maximum of 10 minutes (30 * 20 = 600s) to finish its startup.