I am trying to get Flink cluster running on top of kubernetes. Since current Flink 1.3.1 does not support dynamic scaling yet, I would like to trigger my custom script to stop and restart the job from savepoint when scale up / down with kubernetes.
Is there such feature in Kubernetes that I can have a pre/post event trigger point in autoscale, that I can run custom script after autoscale finished its job? Or it seem the only option now is to write my own cron monitoring to handle by using kubectl scale?
This can be achieve by using readinessProbe for deployment, and execute the script when the container is up and ready.
readinessProbe:
exec:
command:
- ./run_this_script.sh
initialDelaySeconds: 5
periodSeconds: 15