1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/serverless-autoscaling-developer-minscale.adoc
2023-10-30 10:13:25 -04:00

32 lines
892 B
Plaintext

// Module included in the following assemblies:
//
// * serverless/knative-serving/autoscaling/serverless-autoscaling-developer.adoc
:_mod-docs-content-type: REFERENCE
[id="serverless-autoscaling-developer-minscale_{context}"]
= Minimum scale bounds
The minimum number of replicas that can serve an application is determined by the `min-scale` annotation. If scale to zero is not enabled, the `min-scale` value defaults to `1`.
The `min-scale` value defaults to `0` replicas if the following conditions are met:
* The `min-scale` annotation is not set
* Scaling to zero is enabled
* The class `KPA` is used
.Example service spec with `min-scale` annotation
[source,yaml]
----
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: example-service
namespace: default
spec:
template:
metadata:
annotations:
autoscaling.knative.dev/min-scale: "0"
...
----