Targets

Configuring a target provide the Autoscaler with a value that it tries to maintain for the configured metric for a revision. See the metrics documentation for more information about configurable metric types.

The target annotation, used to configure per-revision targets, is metric agnostic. This means the target is simply an integer value, which can be applied for any metric type.

Configuring targets

  1. apiVersion: serving.knative.dev/v1
  2. kind: Service
  3. metadata:
  4. name: helloworld-go
  5. namespace: default
  6. spec:
  7. template:
  8. metadata:
  9. annotations:
  10. autoscaling.knative.dev/target: "50"
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: config-autoscaler
  5. namespace: knative-serving
  6. data:
  7. container-concurrency-target-default: "200"
  1. apiVersion: operator.knative.dev/v1alpha1
  2. kind: KnativeServing
  3. metadata:
  4. name: knative-serving
  5. spec:
  6. config:
  7. autoscaler:
  8. container-concurrency-target-default: "200"
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: config-autoscaler
  5. namespace: knative-serving
  6. data:
  7. requests-per-second-target-default: "150"
  1. apiVersion: operator.knative.dev/v1alpha1
  2. kind: KnativeServing
  3. metadata:
  4. name: knative-serving
  5. spec:
  6. config:
  7. autoscaler:
  8. requests-per-second-target-default: "150"

Feedback

Was this page helpful?

Glad to hear it! Please tell us how we can improve.

Sorry to hear that. Please tell us how we can improve.