Graceful scaledown of stateful apps in Kubernetes

Asking for help? Comment out what you need so we can get more information to help you!

Dear Team,

Cluster information:

Kubernetes version: v1.11.0
Cloud being used: Openshift
Installation method:
Host OS: linux/amd64
CNI and version: Docker 1.13.1
CRI and version: Docker 1.13.1

I have a stateful application deployed in Kubernetes cluster. Now the challenge is how do I scale down the cluster in a graceful way so that each pod while coming down completes it’s pending tasks and then gracefully shutdown. The scenario is similar to what is explained here.

https://medium.com/@marko.luksa/graceful-scaledown-of-stateful-apps-in-kubernetes-2205fc556ba9

Do we have an official feature support for this from kubernetes api.

Thanks In Advance!

Regards,
Balu