<p>I have two Deployments A and B running on a node, I've set up the hpas as so:</p>

<pre><code>apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: A
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: A
  minReplicas: 1
  maxReplicas: 4
  metrics:
    - type: Resource
      resource:
        name: cpu
        targetAverageUtilization: 75
</code></pre>

<p>(and the same for B, but with the names replaced of course). </p>

<p>However when monitoring the HPAs the target CPU utilisation is ALWAYS the same for both HPAs and hence both A and B always scale at the same time even if their simulated workloads are different, so it seems the HPA is targeting the node cpu utilisation rather than the deployment. Further testing by running jobs independent of A and B on the node still trigger HPA scaling of A and B.</p>

<p>How can I can configure it so each HPA ONLY targets the CPU utilisation of the target deployment?</p>

Sam Palmer
<p>The metric name <code>cpu</code> is too vague and does not target the pod CPU utilization. Since you are just looking to use standard pod CPU, I recommend using the v1 HPA version instead of v2Beta1 and define 75 in the <code>targetCPUUtilizationPercentage</code> field as this refers specifically to the pod CPU utilization</p>
