Open dzolotusky opened 6 years ago
I think this will use custom metrics, but CCing folks that should know better.
@kawych @MaciekPytel
Thanks. I'd like to understand if there is a plan for supporting predefined metrics. If there is, I'd like to contribute to making it happen. If not, I'd like to work on one.
Hi @dzolotusky, I'm looking into supporting predefined metrics right now. It will likely require significant work on kubernetes side, so I'm trying to get it in for 1.10. I can link a proposal PR here once I get it ready for review (late next week or so, I think).
In 1.9 you can hack around to get it working, but it won't be pretty. Basically you can already scale based on a global custom metric coming from a pod in k8s ("object metric" in https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/). So you could create a pod re-exporting the predefined metric and scale based on that. The problems with this approach (other than obvious ugliness) are:
Feel free to post here or just ping me on slack if you want to discuss this in some more details (I'm in CET timezone).
@MaciekPytel Thanks, I'll wait for the proposal PR before pushing to discuss this further as the proposal will likely answer many of my initial questions. If you need any help as you're crafting the proposal, feel free to ping me on Slack. (I'm also in the CET timezone)
@MaciekPytel any update on this? Anything that I can do to help?
1.10 is out, is it released?, if so please point to any documentation on it.
1.10 is out. You can scale based on any metrics available in stackdrive. Detailed tutorial on pub/sub based scaling can be found in below link
https://cloud.google.com/kubernetes-engine/docs/tutorials/external-metrics-autoscaling
I'd like to use k8s-stackdriver to do pod autoscaling based on metrics that already exist in Stackdriver's predefined metrics list. For example, using Cloud Pub/Sub's subscription/num_undelivered_messages as the metric to autoscale on.
Is this possible with what exists today or what is planned for this project, or is this only intended for custom metrics?