<p>I'm trying to play with autoscaling scenarios (currently with microk8s single node personal cluster).</p>

<p>Basic CPU scaling works fine.</p>

<p>For the more complex scenarios, I'm trying to follow the guide at <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics" rel="noreferrer">https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics</a> but I can't figure out how / where the possible pod metrics / object metrics are defined / documented. For example, .. where is "packets-per-second" documented .</p>

<p>I can kind of navigate via kubectl or manually exercising the REST APIs but there has to be a better way.</p>

<p>Thanks</p>

<pre><code>apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
  name: php-apache
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: php-apache
  minReplicas: 1
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: AverageUtilization
        averageUtilization: 50
  - type: Pods
    pods:
      metric:
        name: packets-per-second ====&gt; where is this name defined/documented ?
      targetAverageValue: 1k
  - type: Object
    object:
      metric:
        name: requests-per-second ====&gt; where is this name defined/documented ?
      describedObject:
        apiVersion: networking.k8s.io/v1beta1
        kind: Ingress
        name: main-route
      target:
        kind: Value
        value: 10k
</code></pre>

<p>CPU or Memory usage in ResourceMetric is <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/server/stats/summary.go" rel="noreferrer">provided by kubelet</a> and collected by <a href="https://github.com/kubernetes-incubator/metrics-server" rel="noreferrer">metric-server</a></p>

<p>But for <code>packets-per-second</code> and <code>requests-per-second</code>, there are no official provider, so this field can actually be any value, depend on the non-official custom metrics API you deployed. </p>

<p>Some popular custom metrics API are listed at  <a href="https://github.com/kubernetes/metrics/blob/master/IMPLEMENTATIONS.md" rel="noreferrer">https://github.com/kubernetes/metrics/blob/master/IMPLEMENTATIONS.md</a></p>
