I'm trying(learning) to figure out the best way to utilize CPU (and RAM) on k8s nodes. My final goal is to make sure CPU utilization on each node in the cluster is above X%
Till now I've read about cluster-autoscaler and HPA, but not sure if they'd help me with the use case.
From what I've read:
cluster-autoscaler
is used to autoscale nodes based on a comparison between replica count andresources.request
Vs available CPU on the target ec2 instance - which is NOT based on traffic/actual CPU usageHPA
is based on CPU/actual cpu usage, but for individual pods
I essentially wanna get to a point where kubectl top nodes
would show all nodes are using > X% (let's say 60%) - and ideally trigger the autoscaling if we reach X2% (let's say 80%)
any suggestion/pointer on how to go about this use case? (or I should somehow use the combination of these 2 autoscaling mechanisms)