title: Trying to understand the meaning of averageUtilization in Kubernetes autoscaling
body: <p>The <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale" rel="nofollow noreferrer">docs</a> says:</p>
  <blockquote>
  <p>For per-pod resource metrics (like CPU), the controller fetches the metrics from the resource metrics API for each Pod targeted by the HorizontalPodAutoscaler. Then, if a target utilization value is set, the controller calculates the utilization value as a percentage of the equivalent <strong>resource request</strong> on the containers in each Pod. If a target raw value is set, the raw metric values are used directly. The controller then takes the mean of the utilization or the raw value (depending on the type of target specified) across all targeted Pods, and produces a ratio used to scale the number of desired replicas.</p>
  </blockquote>
  <p>Assume I have a Pod with:</p>
  <pre><code>        resources:
            limits:
              cpu: &quot;0.3&quot;
              memory: 500M
            requests:
              cpu: &quot;0.01&quot;
              memory: 40M
  </code></pre>
  <p>and now I have an autoscaling definition as:</p>
  <pre><code>type: Resource
  resource:
    name: cpu
    target:
      type: Utilization
      averageUtilization: 60
  </code></pre>
  <p>Which according to the docs:</p>
  <blockquote>
  <p>With this metric the HPA controller will keep the average utilization of the pods in the scaling target at 60%. Utilization is the ratio between the current usage of resource to the <strong>requested</strong> resources of the pod</p>
  </blockquote>
  <p>So, I'm not understanding something here. If <code>request</code> is the minimum resources required to run the app, how would scaling be based on this value? 60% of 0.01 is nothing, and the service would be constantly scaling.</p>