Reputation: 377
Is it possible to set a liveness probe to check that a separate service is existing? For an app in one pod, and a database in a separate pod, I would like for the app pod to check the liveness of the database pod rather than this pod itself. The reason for this is that once the db is restarted, the app is unable to reconnect to the new database. My idea is to set this so that when the db liveness check fails, the app pod is automatically restarted in order to make a fresh connection to the new db pod.
Upvotes: 0
Views: 145
Reputation: 54211
No, you would need to write that in a script or as part of your http endpoint.
Upvotes: 1