Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Serverless Containers
  • Comparing with other Yandex Cloud services
    • All guides
    • Getting an IAM token for a service account using a container
      • Making a revision active
      • Changing the container operation mode
      • Adding environment variables
      • Providing Yandex Lockbox secrets
      • Specifying a cloud network
      • Setting the number of concurrent container instance calls
        • Viewing scaling settings
        • Adding scaling settings
        • Deleting scaling settings
      • Viewing monitoring charts
      • Migrating to the ru-central1-d availability zone
      • Deleting a container
    • Viewing operations with service resources
  • Access management
  • Tools
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Managing a container
  3. Scaling a container
  4. Adding scaling settings

Adding container scaling settings

Written by
Yandex Cloud
Updated at June 1, 2026

You can set the following:

  • Number of prepared instances.
  • Maximum number of container instances per availability zone.
  • Maximum number of simultaneous container invocations per availability zone.

Downtime of provisioned instances and runtime of the container in them are charged additionally.

The scaling settings must be within the quotas.

Note

Scaling settings take effect within five minutes after they are configured.

Management console
CLI
Terraform
API
  1. In the management console, select the folder with your container.
  2. Go to Serverless Containers.
  3. Select the container.
  4. Navigate to the Editor tab.
  5. Under Settings, specify the number of provisioned instances.
  6. Click Create revision.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

To set scaling settings, run this command:

yc serverless container revision deploy \
  --container-id <container_ID> \
  --image <Docker_image_URL> \
  --min-instances 3 \
  --zone-instances-limit 2 \
  --zone-requests-limit 1 \
  --service-account-id <service_account_ID>

Where:

  • --container-id: Container ID. To find out the ID, get the list of containers.
  • --image: Docker image URL.
  • --min-instances: Number of provisioned instances.
  • --zone-instances-limit: Maximum number of container instances per availability zone.
  • --zone-requests-limit: Maximum number of simultaneous container invocations per availability zone.
  • --service-account-id: ID of the service account with Docker image download permissions.

Result:

done (3s)
id: bbalbpl7k8hmn********
container_id: bbab5i36nvda********
created_at: "2026-04-01T13:46:38.069Z"
image:
  image_url: cr.yandex/crpp35hht729********/ubuntu:hello
  image_digest: sha256:f6f34c6cf5f56e594e9828274592f1cc4d9383b1689057ccaf188d41********
resources:
  memory: "134217728"
  cores: "1"
  core_fraction: "100"
execution_timeout: 3s
concurrency: "1"
service_account_id: aje07l4q4vmo********
status: ACTIVE
provision_policy:
  min_instances: "1"
scaling_policy:
  zone_instances_limit: "2"
  zone_requests_limit: "1"
log_options:
  folder_id: b1gc1t4cb638********
runtime:
  http: {}
metadata_options: {}

To learn more about the command, see the CLI reference.

With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.

Terraform is distributed under the Business Source License. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.

For more information about the provider resources, see the relevant documentation on the Terraform website or its mirror.

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

  1. To set the number of prepared instances, describe the min_instances parameter in the configuration file.

    You can configure other scaling settings using the management console, Yandex Cloud CLI, or API.

    Here is an example of the configuration file structure:

    resource "yandex_serverless_container" "container" {
      name               = "container"
      service_account_id = "ajeh91ebakk1********"
      memory             = 128
      image {
        url = "cr.yandex/crpnj09pj62e********/ubuntu:hello"
      }
      provision_policy {
        min_instances = 2
      }
    }
    

    Where:

    • name: Container name.
    • service_account_id: ID of the service account with Docker image download permissions.
    • memory: Required memory. The default value is 128 MB.
    • url: Docker image URL.
    • min_instances: Number of provisioned instances.

    For more information about yandex_serverless_container properties, see this provider guide.

  2. Run a check using the following command:

    terraform plan
    

    A list of resource parameters will be displayed in the terminal. This is a test step: the resource will not be changed. Terraform will show any errors in the configuration.

  3. Apply the configuration changes:

    terraform apply
    
  4. Confirm changing the resources: enter yes in the terminal window and press Enter.

To add container scaling settings, use the deployRevision REST API method for the Container resource or the ContainerService/DeployRevision gRPC API call.

See alsoSee also

  • Scaling a container

Was the article helpful?

Previous
Viewing scaling settings
Next
Deleting scaling settings
© 2026 Direct Cursus Technology L.L.C.