TECHIES WORLD

For Techs.... Techniques.... Technologies....

BashLinux

How to stop pods for a service in Kubernates

We can use the kubectl command to stop pods for a service in Kubernates.

#kubectl scale deploy <service> --replicas=0

Where service need to be replaced with the name of the service that need to stop.

This will scale down the number of pods to zero.

Please note that if the service is using hpa, this can be done by modifying hpa configuration as explained in the following link.

That's all…

Leave a Reply