az spring app deployment
Note
This reference is part of the spring extension for the Azure CLI (version 2.56.0 or higher). The extension will automatically install the first time you run an az spring app deployment command. Learn more about extensions.
Commands to manage life cycle of deployments of an app in Azure Spring Apps. More operations on deployments can be done on app level with parameter --deployment. e.g. az spring app deploy --deployment <staging deployment>
.
Commands
Name | Description | Type | Status |
---|---|---|---|
az spring app deployment create |
Create a staging deployment for the app. To deploy code or update setting to an existing deployment, use |
Extension | GA |
az spring app deployment delete |
Delete a deployment of the app. |
Extension | GA |
az spring app deployment generate-heap-dump |
Generate a heap dump of your target app instance to given file path. |
Extension | GA |
az spring app deployment generate-thread-dump |
Generate a thread dump of your target app instance to given file path. |
Extension | GA |
az spring app deployment list |
List all deployments in an app. |
Extension | GA |
az spring app deployment show |
Show details of a deployment. |
Extension | GA |
az spring app deployment start-jfr |
Start a JFR on your target app instance to given file path. |
Extension | GA |
az spring app deployment create
Create a staging deployment for the app. To deploy code or update setting to an existing deployment, use az spring app deploy/update --deployment <staging deployment>
.
az spring app deployment create --app
--name
--resource-group
--service
[--apms]
[--artifact-path]
[--build-certificates]
[--build-env]
[--builder]
[--config-file-patterns]
[--container-args]
[--container-command]
[--container-image]
[--container-registry]
[--cpu]
[--custom-actuator-path]
[--custom-actuator-port]
[--disable-app-log]
[--disable-probe {false, true}]
[--disable-validation {false, true}]
[--enable-liveness-probe {false, true}]
[--enable-readiness-probe {false, true}]
[--enable-startup-probe {false, true}]
[--env]
[--grace-period --termination-grace-period-seconds]
[--instance-count]
[--jvm-options]
[--language-framework]
[--liveness-probe-config]
[--main-entry]
[--max-replicas]
[--memory]
[--min-replicas]
[--no-wait]
[--readiness-probe-config]
[--registry-password]
[--registry-username]
[--runtime-version {Java_11, Java_17, Java_21, Java_8, NetCore_31}]
[--scale-rule-auth --sra]
[--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc]
[--scale-rule-metadata --srm]
[--scale-rule-name --srn]
[--scale-rule-type --srt]
[--server-version]
[--skip-clone-settings]
[--source-path]
[--startup-probe-config]
[--target-module]
[--version]
Examples
Deploy source code to a new deployment of an app. This will pack current directory, build binary with Pivotal Build Service and then deploy.
az spring app deployment create -n green-deployment --app MyApp -s MyCluster -g MyResourceGroup --source-path
Deploy a pre-built jar to an app with jvm options and environment variables.
az spring app deployment create -n green-deployment --app MyApp -s MyCluster -g MyResourceGroup --artifact-path app.jar --jvm-options="-XX:+UseG1GC -XX:+UseStringDeduplication" --env foo=bar
Deploy a container image on Docker Hub to an app.
az spring app deployment create -n green-deployment --app MyApp -s MyCluster -g MyResourceGroup --container-image contoso/your-app:v1
Deploy a container image on a private registry to an app.
az spring app deployment create -n green-deployment --app MyApp -s MyCluster -g MyResourceGroup --container-image contoso/your-app:v1 --container-registry myacr.azurecr.io --registry-username <username> --registry-password <password>
Required Parameters
Name of app.
Name of deployment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
(Enterprise Tier Only) Space-separated APM names.
Deploy the specified pre-built artifact (jar, war or netcore zip, war is in public preview).
(Enterprise Tier Only) Space-separated certificate names, the certificates are used during build time.
Space-separated environment variables in 'key[=value]' format.
(Enterprise Tier Only) Build service builder used to build the executable.
Property | Value |
---|---|
Default value: | default |
(Enterprise Tier Only) Config file patterns separated with ',' to decide which patterns of Application Configuration Service will be used. Use '""' to clear existing configurations.
The arguments of the container image.
Property | Value |
---|---|
Parameter group: | Custom Container Arguments |
The command of the container image.
Property | Value |
---|---|
Parameter group: | Custom Container Arguments |
The container image tag.
Property | Value |
---|---|
Parameter group: | Custom Container Arguments |
The registry of the container image.
Property | Value |
---|---|
Parameter group: | Custom Container Arguments |
Default value: | docker.io |
CPU resource quantity. Should be 250m, 500m, 750m, 1250m or number of CPU cores.
(Enterprise Tier Only) Custom actuator path for the app. Default to "/actuator".
(Enterprise Tier Only) Custom actuator port for the app. Default to 8080.
Do not print application logs when deploy application.
Property | Value |
---|---|
Default value: | False |
If true, disable the liveness and readiness probe.
Property | Value |
---|---|
Accepted values: | false, true |
If true, disable jar validation.
Property | Value |
---|---|
Accepted values: | false, true |
If false, will disable the liveness probe of the app instance.
Property | Value |
---|---|
Parameter group: | App Customization Arguments |
Accepted values: | false, true |
If false, will disable the readiness probe of the app instance.
Property | Value |
---|---|
Parameter group: | App Customization Arguments |
Accepted values: | false, true |
If false, will disable the startup probe of the app instance.
Property | Value |
---|---|
Parameter group: | App Customization Arguments |
Accepted values: | false, true |
Space-separated environment variables in 'key[=value]' format.
Optional duration in seconds the app instance needs to terminate gracefully.
Property | Value |
---|---|
Parameter group: | App Customization Arguments |
Number of instance.
A string containing jvm options, use '=' instead of ' ' for this argument to avoid bash parse error, eg: --jvm-options='-Xms1024m -Xmx2048m'.
Language framework of the container image uploaded. Supported values: "springboot", "".
Property | Value |
---|---|
Parameter group: | Custom Container Arguments |
A json file path indicates the liveness probe config.
Property | Value |
---|---|
Parameter group: | App Customization Arguments |
A string containing the path to the .NET executable relative to zip root.
The maximum number of replicas.
Property | Value |
---|---|
Parameter group: | StandardGen2 Arguments |
Default value: | 10 |
Memory resource quantity. Should be 512Mi, 1536Mi, 2560Mi, 3584Mi or #Gi, e.g., 1Gi, 3Gi.
The minimum number of replicas.
Property | Value |
---|---|
Parameter group: | StandardGen2 Arguments |
Default value: | 1 |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
A json file path indicates the readiness probe config.
Property | Value |
---|---|
Parameter group: | App Customization Arguments |
The password of the container registry.
Property | Value |
---|---|
Parameter group: | Custom Container Arguments |
The username of the container registry.
Property | Value |
---|---|
Parameter group: | Custom Container Arguments |
Runtime version of used language.
Property | Value |
---|---|
Accepted values: | Java_11, Java_17, Java_21, Java_8, NetCore_31 |
Scale rule auth parameters. Format <triggerParameter>=<secretRef>
and separated by space.
Property | Value |
---|---|
Parameter group: | StandardGen2 Arguments |
The maximum number of concurrent requests before scale out. Only supported for http and tcp scale rules.
Property | Value |
---|---|
Parameter group: | StandardGen2 Arguments |
Scale rule metadata. Format "key[=value]" and separated by space.
Property | Value |
---|---|
Parameter group: | StandardGen2 Arguments |
The name of the scale rule.
Property | Value |
---|---|
Parameter group: | StandardGen2 Arguments |
The type of the scale rule. Default: http.
Property | Value |
---|---|
Parameter group: | StandardGen2 Arguments |
(Standard and Basic Tiers Only) Tomcat server version. List all supported server versions by running az spring list-support-server-versions -o table
. This feature is in public preview.
Create staging deployment will automatically copy settings from production deployment.
Property | Value |
---|---|
Default value: | False |
Deploy the specified source folder. The folder will be packed into tar, uploaded, and built using kpack. Default to the current folder if no value provided.
Property | Value |
---|---|
Parameter group: | Source Code deploy Arguments |
A json file path indicates the startup probe config.
Property | Value |
---|---|
Parameter group: | App Customization Arguments |
Child module to be deployed, required for multiple jar packages built from source code.
Property | Value |
---|---|
Parameter group: | Source Code deploy Arguments |
Deployment version, keep unchanged if not set.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az spring app deployment delete
Delete a deployment of the app.
az spring app deployment delete --app
--name
--resource-group
--service
[--no-wait]
Required Parameters
Name of app.
Name of deployment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az spring app deployment generate-heap-dump
Generate a heap dump of your target app instance to given file path.
az spring app deployment generate-heap-dump --app
--app-instance
--file-path
--resource-group
--service
[--deployment]
Required Parameters
Name of app.
Target app instance you want to dump.
The mount file path for your dump file.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Name of an existing deployment of the app. Default to the production deployment if not specified.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az spring app deployment generate-thread-dump
Generate a thread dump of your target app instance to given file path.
az spring app deployment generate-thread-dump --app
--app-instance
--file-path
--resource-group
--service
[--deployment]
Required Parameters
Name of app.
Target app instance you want to dump.
The mount file path for your dump file.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Name of an existing deployment of the app. Default to the production deployment if not specified.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az spring app deployment list
List all deployments in an app.
az spring app deployment list --app
--resource-group
--service
Required Parameters
Name of app.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az spring app deployment show
Show details of a deployment.
az spring app deployment show --app
--name
--resource-group
--service
Required Parameters
Name of app.
Name of deployment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az spring app deployment start-jfr
Start a JFR on your target app instance to given file path.
az spring app deployment start-jfr --app
--app-instance
--file-path
--resource-group
--service
[--deployment]
[--duration]
Required Parameters
Name of app.
Target app instance you want to dump.
The mount file path for your dump file.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Name of an existing deployment of the app. Default to the production deployment if not specified.
Duration of JFR.
Property | Value |
---|---|
Default value: | 60s |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |