Autoscaling of cluster on my own servers

Autoscaling of cluter for gce is given but how to implement it if we are not running our cluster on gce or any other cloud and instead using our own machines

Do you have an API for “your machines”? If you do, then you want to look at the cluster autoscaler project and probably fork it and add support for your API.

If you don’t have an API, then no way to automatically add nodes :). You can use HPA, but a computer won’t be able to add nodes if it can’t be don’t from a program :slight_smile:

There is probably something already written. If you want to scale nodes and not pods (you probably want to scale pods first!), You can see this for example:

For pods, you can check the HPA documentation on kubernetes website. I think it is quite good.

And don’t hesitate to ask anything that is not clear there :slight_smile:

Thank you. Will go through it. Actually realised that using HPA solves my problem.

Better then. Don’t hesitate to ask :slight_smile:

I am trying to use hpa for statefulset application. I am getting following error in the logs:
“unable to get metrics for resource cpu: failed to get pod resource metrics: the server could not find the requested resource (get services http:heapster:)”.
I went through the solutions available online but none is working for me.
I installed the metrics service API from here:

Any idea how to solve this?

You can’t autoscale an stateful set. Read the docs about them, basically is something that it is assumed that need more work to do.

If you can use a deployment, instead of an stateful set, that would be way more easy.

If you need an stateful set, you will need to have probably a controller for that particular app that knows how to scale it :-/

The docs about stateful set should be a good starting point for explaining this. But, as always, don’t hesitate to ask :slight_smile: