Scaling a service from the API

In my team we use Rancher to take care of our docker containers. I am trying to write a script to fix a recurring problem that requires me to scale down and back up a given service. I am looking to do this with the API but I am having a hard time making it work. Anyone has any pointers to documentation/answers that might help?

It sounds like you might want a horizontal pod autoscaler. Rancher has docs about it here and the Kubernetes documentation about it is here

1 Like