Handling an Ungraceful Service in Kubernetes by Bash
Too Long; Didn't Read
Kubernetes has several mechanisms to check if your app is able to handle connections and in return if it wants to kill you app (scale down, or end of life for your preemptible/spot-instance node,… it will signal your app to wrap up and shutdown. If your server does not handle shutdowns gracefully or it is not adjustable in ways you need to make it work in k8s (shutdown delay, …), notice you can always wrap it with bash.