Kubernetes Replicaset scale down

When we scale down the replicaset from 3 to 2, what happens to all the processes that are running on the pod which is terminated?

Hello @maheshshivhare,

In Kubernetes, we have something called a grace period or terminationGracePeriodSeconds, by default it sets to 30 seconds. The container will have 30 seconds to finish the current process and terminate gracefully.

Optional duration in seconds the pod needs to terminate gracefully. May be
decreased in delete request. Value must be non-negative integer. The value
zero indicates stop immediately via the kill signal (no opportunity to shut
down). If this value is nil, the default grace period will be used instead.
The grace period is the duration in seconds after the processes running in
the pod are sent a termination signal and the time when the processes are
forcibly halted with a kill signal. Set this value longer than the expected
cleanup time for your process. Defaults to 30 seconds.

Thanks,
Trung.