Openshift has support for POD autoscaling:
However, when downscaling it's possible to downscale too quickly for the infinispan cache and so have data loss. The images need to be modified to allow autoscaling.
One possible approach is to use statefulsets:
It may also be possible to do a preStop hook.