yc serverless container revision deploy
Статья создана
Обновлена 5 сентября 2025 г.
Deploy new container revision
Command Usage
Syntax:
yc serverless container revision deploy (--container-id <CONTAINER_ID>|--container-name <CONTAINER_NAME>) [Flags...] [Global Flags...]
Flags
| Flag | Description |
|---|---|
--container-id |
stringContainer id. |
--container-name |
stringContainer name. |
--async |
Display information about the operation in progress, without waiting for the operation to complete. |
--memory |
byteSizeRequired memory. Example: '1GB', '128MB'. The default value is 128MB. |
--cores |
intNumber of cores that will be available to a container instance. |
--core-fraction |
intIf provided, specifies baseline performance for a core in percent. |
--execution-timeout |
durationExecution timeout. The default value is 3s |
--concurrency |
intSet the maximum number of concurrent requests allowed per container instance. |
--service-account-id |
stringService account id. |
--description |
stringRevision description. |
--environment |
stringToStringRevision environment variables. |
--image |
stringImage to run |
--command |
value[,value]Comma-separated entrypoint for the container image. If not specified, the image's default ENTRYPOINT will be used. Pass an empty string to reset it to zero value. |
--args |
value[,value]Comma-separated list of arguments that are passed to the command, run by a container. If not specified, the image's default CMD will be used. Pass an empty string to reset it to zero value. |
--secret |
PROPERTY=VALUE[,PROPERTY=VALUE...]Revision secret. Possible property names:
|
--min-instances |
intSet the minimum number of concurrent instances. |
--zone-instances-limit |
intUpper limit for instances count in each zone. |
--zone-requests-limit |
intUpper limit for requests count in each zone. |
--network-id |
stringNetwork id to be used in new revision. |
--network-name |
stringNetwork name to be used in new revision. |
--subnets |
value[,value]Specifies the subnets for the revision. Can use subnet names or subnet ids, or both. Example: `--subnets=id1,id2 --subnets=name3'. |
--storage-mounts |
mount-point-path=/data,bucket=user-bucket,read-only=falseDEPRECATED: Use mounts instead. Storage mounts. Example: mount-point-path=/data,bucket=user-bucket,read-only=false Possible property names:
|
--mount |
PROPERTY=VALUE[,PROPERTY=VALUE...]Add a mount to the revision. Example: type=ephemeral-disk,mount-point=/mnt/point,size=5GB Possible property names:
|
--runtime |
stringContainer execution method. Valid values are 'http' and 'task'. |
--metadata-options |
PROPERTY=VALUE[,PROPERTY=VALUE...]Options set the access mode to revision's metadata endpoints. Example: aws-v1-http-endpoint=disabled,gce-http-endpoint=enabled Possible property names:
|
--no-logging |
Disable logging from container. |
--log-group-id |
stringSend logs to custom log group by id. |
--log-group-name |
stringSend logs to custom log group by name. |
--log-folder-id |
stringSend logs to default log group of custom folder by id. |
--log-folder-name |
stringSend logs to default log group of custom folder by name. |
--min-log-level |
stringMin log level. Values: 'trace', 'debug', 'info', 'warn', 'error', 'fatal' |
--async-service-account-id |
stringService account for asynchronous container invocation. |
Global Flags
| Flag | Description |
|---|---|
--profile |
stringSet the custom configuration file. |
--debug |
Debug logging. |
--debug-grpc |
Debug gRPC logging. Very verbose, used for debugging connection problems. |
--no-user-output |
Disable printing user intended output to stderr. |
--retry |
intEnable gRPC retries. By default, retries are enabled with maximum 5 attempts. Pass 0 to disable retries. Pass any negative value for infinite retries. Even infinite retries are capped with 2 minutes timeout. |
--cloud-id |
stringSet the ID of the cloud to use. |
--folder-id |
stringSet the ID of the folder to use. |
--folder-name |
stringSet the name of the folder to use (will be resolved to id). |
--endpoint |
stringSet the Cloud API endpoint (host:port). |
--token |
stringSet the OAuth token to use. |
--impersonate-service-account-id |
stringSet the ID of the service account to impersonate. |
--no-browser |
Disable opening browser for authentication. |
--format |
stringSet the output format: text (default), yaml, json, json-rest. |
--jq |
stringQuery to select values from the response using jq syntax |
-h,--help |
Display help for the command. |
Examples
- Добавить переменные окружения контейнеру
- Настройте асинхронный вызов
- Передать секреты Yandex Lockbox в контейнер
- Пример команды
- Создать ревизию контейнера
- Настроить параметры сервиса метаданных контейнера
- Смонтировать бакеты в контейнер
- Смонтировать эфемерный диск в контейнер
- Добавить настройки масштабирования контейнеру
- Удалить настройки масштабирования контейнера
- Изменить режим работы контейнера