// Module included in the following assemblies:
//
// * serverless/knative-serving/autoscaling/serverless-autoscaling-developer.adoc

:_mod-docs-content-type: PROCEDURE
[id="serverless-autoscaling-maxscale-kn_{context}"]
= Setting the max-scale annotation by using the Knative CLI

Using the Knative (`kn`) CLI to set the `max-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-max` flag to create or modify the `max-scale` value for a service.

.Prerequisites

* Knative Serving is installed on the cluster.
* You have installed the Knative (`kn`) CLI.

.Procedure

* Set the maximum number of replicas for the service by using the `--scale-max` flag:
+
[source,terminal]
----
$ kn service create <service_name> --image <image_uri> --scale-max <integer>
----
+
.Example command
[source,terminal]
----
$ kn service create example-service --image quay.io/openshift-knative/knative-eventing-sources-event-display:latest --scale-max 10
----
