I need to scale down the number of pods in a replica controllers. However, I need a clean scale down:
I do not want a pod to be deleted when it is still doing stuff. Is there a way to do that with Kubernetes?
Check out the Termination of Pods section in the pods user guide. You might wish to implement a preStop hook to ensure traffic is drained before the TERM signal is sent to the processes in the pod.