Sam Perrin TIL Blog

Kubernetes - Quickly restart pod

August 05, 2019

Reduce replica size down to 0 to terminate the deployments in a pod

kubectl scale deployment {deployment name} --replicas=0 -n {namespace}

Increase replica size to restart the deployments in a pod

kubectl scale deployment {deployment name} --replicas=2 -n {namespace}


Sam Perrin

Written by Sam Perrin who loves all things Automation related! You should follow him on Twitter