I have a simple consol application I want there is rabbitmq connection as a consumer and there is a database connection to SQL Server.
Before Containarize the application. There is some commands I have implemented, For example if I enterned X the application will exit so internaly I stop the consumer first and make sure there is no pending message and then gracefully I exit the application.
After Containarize the application I did successfully containarize the application and working perfectly under kuberenetes cluster but my problem is that How to send command to my application ?
For example I want to implement Livenessprob: check the database connection
Before terminating the pod I want to write x to my running console to implement gracefully exit the application without messages loss.
postStart:
exec:
command: []
preStop:
exec:
command: []
I expecting the solution to be a specific command which is writing to my running console application But how to send that command? Or how to make my console able to receive commands from kubernetes?