mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 09:46:53 +01:00
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * serverless/knative-serving/autoscaling/serverless-autoscaling-developer.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="serverless-autoscaling-minscale-kn_{context}"]
|
|
= Setting the min-scale annotation by using the Knative CLI
|
|
|
|
Using the Knative (`kn`) CLI to set the `min-scale` annotation provides a more streamlined and intuitive user interface over modifying YAML files directly. You can use the `kn service` command with the `--scale-min` flag to create or modify the `min-scale` value for a service.
|
|
|
|
.Prerequisites
|
|
|
|
* Knative Serving is installed on the cluster.
|
|
* You have installed the Knative (`kn`) CLI.
|
|
|
|
.Procedure
|
|
|
|
* Set the minimum number of replicas for the service by using the `--scale-min` flag:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ kn service create <service_name> --image <image_uri> --scale-min <integer>
|
|
----
|
|
+
|
|
.Example command
|
|
[source,terminal]
|
|
----
|
|
$ kn service create example-service --image quay.io/openshift-knative/knative-eventing-sources-event-display:latest --scale-min 2
|
|
----
|
|
|
|
// TODO: Check if it can be used with update and other service commands.
|