Deleting container scaling settings
Written by
Updated at October 17, 2024
Management console
CLI
API
- In the management console
, select the folder with your container. - Select Serverless Containers.
- Select the container.
- Go to the Editor tab.
- Under Settings, set the number of ready-to-go instances to
0
. - Click Create revision.
To delete scaling settings for a container, create a new container revision and set the min-instances
parameter to 0
:
yc serverless container revision deploy \
--container-id <container_ID> \
--image <Docker_image_URL> \
--cores 1 \
--memory 1GB \
--execution-timeout 3s \
--service-account-id <service_account_ID> \
--min-instances 0
Where:
--container-id
: Container ID. To find out the ID, get a list of containers.--cores
: Number of cores available to the container.--memory
: Required memory. The default value is 128 MB.--execution-timeout
: Timeout. The default value is 3 seconds.--service-account-id
: ID of the service account authorized to download the image.--min-instances
: Number of ready-to-go instances.
Result:
id: bbajn5q2d74c********
container_id: bba3fva6ka5g********
created_at: "2021-07-09T15:04:55.135Z"
image:
image_url: cr.yandex/crpd3cicopk7********/test-container:latest
image_digest: sha256:de8e1dce7ceceeafaae122f7670084a1119c961cd9ea1795eae92bd********
resources:
memory: "1073741824"
cores: "1"
execution_timeout: 3s
service_account_id: ajeqnasj95o7********
status: ACTIVE
To delete container scaling settings, use the deployRevision REST API method for the Container resource or the ContainerService/DeployRevision gRPC API call.