All Products
Search
Document Center

Enterprise Distributed Application Service:StartK8sAppPrecheck

Last Updated:Mar 30, 2026

Starts precheck for Kubernetes application changes.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

edas:ReadCluster

none

*All Resource

*

None None

Request syntax

POST /pop/v5/k8s/app_precheck HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

ClusterId

string

Yes

The ID of the cluster.

c37aec2a-bcca-4ec1-****-****

Namespace

string

Yes

The namespace of the Kubernetes cluster. This parameter specifies the Kubernetes namespace in which your application is deployed. By default, the default namespace is used.

default

AppId

string

No

The ID of the application.

af58edcf-f7eb-****-****-db4e425f****

AppName

string

No

The name of the application. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 36 characters in length.

testapp

Replicas

integer

No

The number of application instances.

2

LimitmCpu

integer

No

The maximum number of CPU cores allowed for each application instance when the application is running. Unit: millicores. The value 0 indicates that no limit is set on CPU cores.

1000

RequestsmCpu

integer

No

The maximum number of CPU cores allowed for each application instance when the application is created. Unit: millicores.

500

LimitMem

integer

No

The maximum size of memory allowed for each application instance when the application is running. Unit: MB. The value of LimitMem must be greater than or equal to that of RequestsMem.

4096

RequestsMem

integer

No

The maximum size of memory allowed for each application instance when the application is created. Unit: MB. The value 0 indicates that no limit is set on the memory size. The value of RequestsMem cannot be greater than that of LimitMem.

1024

LimitEphemeralStorage

integer

No

The maximum size of space required by ephemeral storage. Unit: GB. The value 0 indicates that no limit is set on the ephemeral storage space.

4

RequestsEphemeralStorage

integer

No

The minimum size of space required by ephemeral storage. Unit: GB. The value 0 indicates that no limit is set on the ephemeral storage space.

2

Envs

string

No

The environment variables that are used to deploy the application. The value must be a JSON array. Valid values: regular environment variables, Kubernetes ConfigMap environment variables, and Kubernetes Secret environment variables. Specify regular environment variables in the following format:

{"name":"x", "value": "y"}

Specify Kubernetes ConfigMap environment variables in the following format to reference values from ConfigMaps:

{ "name": "x2", "valueFrom": { "configMapKeyRef": { "name": "my-config", "key": "y2" } } }

Specify Kubernetes Secret environment variables in the following format to reference values from Secrets:

{ "name": "x3", "valueFrom": { "secretKeyRef": { "name": "my-secret", "key": "y3" } } }

Note

If you want to cancel this configuration, set this parameter to an empty JSON array, which is in the format of "[]".

[{"name":"x1","value":"y1"},{"name":"x2","valueFrom":{"configMapKeyRef":{"name":"my-config","key":"y2"}}},{"name":"x3","valueFrom":{"secretKeyRef":{"name":"my-secret","key":"y3"}}}]

EnvFroms

string

No

The Kubernetes environment variables that are configured in EnvFrom mode. A ConfigMap or Secret is mounted to a directory. Each key corresponds to a file in the directory, and the content of the file is the value of the key.

The following parameters are included in the configuration of the EnvFroms parameter:

  • configMapRef: the ConfigMap that is referenced. The following parameter is included:

    name: the name of the ConfigMap.

  • secretRef: the Secret that is referenced. The following parameter is included:

    name: the name of the Secret.

[ { "name": "appname", "valueFrom": { "configMapKeyRef": { "name": "appconf" } } } ]

EmptyDirs

string

No

The configuration for mounting a Kubernetes emptyDir volume to a directory in an elastic container instance. The following parameters are included in the configuration:

  • mountPath: The mount path in the container. This parameter is required.

  • readOnly: (Optional) The mount mode. The value true indicates the read-only mode. The value false indicates the read and write mode. Default value: false.

  • subPathExpr: (Optional) The regular expression that is used to match the subdirectory.

[{"mountPath":"/app-log","subPathExpr":"$(POD_IP)"},{"readOnly":true,"mountPath":"/etc/nginx"}]

JavaStartUpConfig

string

No

The configuration of Java startup parameters for a Java application. These startup parameters involve the memory, application, garbage collection (GC) policy, tools, service registration and discovery, and custom configurations. Proper parameter settings help reduce the GC overheads, shorten the server response time, and improve the throughput. Set this parameter to a JSON string. In the example, original indicates the configuration value, and startup indicates a startup parameter. The system automatically concatenates all startup values as the settings of Java startup parameters for the application. To delete this configuration, leave the parameter value empty by entering "" or "{}". The following parameters are included in the configuration:

  • InitialHeapSize: the initial size of the heap memory.

  • MaxHeapSize: the maximum size of the heap memory.

  • CustomParams: the custom parameters, such as JVM -D parameters.

  • Other parameters: You can view the JSON structure submitted by the frontend.

{"InitialHeapSize":{"original":512,"startup":"-Xms512m"},"MaxHeapSize":{"original":1024,"startup":"-Xmx1024m"}}

ConfigMountDescs

string

No

The configuration for mounting a Kubernetes ConfigMap or Secret to a directory in an elastic container instance. The following parameters are included in the configuration:

  • name: the name of the Kubernetes ConfigMap or Secret.

  • type: the type of the API object that you want to mount. You can mount a Kubernetes ConfigMap or Secret.

  • mountPath: the mount path. The mount path must be an absolute path that starts with a forward slash (/).

[{"name":"nginx-config","type":"ConfigMap","mountPath":"/etc/nginx"},{"name":"tls-secret","type":"secret","mountPath":"/etc/ssh"}]

PvcMountDescs

string

No

The configuration for mounting a Kubernetes PersistentVolumeClaim (PVC) to a directory in an elastic container instance. The following parameters are included in the configuration:

  • pvcName: the name of the PVC. Make sure that the volume exists and is in the Bound state.

  • mountPaths: the directory to which you want to mount the PVC. You can configure multiple directories. You can set the following two parameters for each mount directory:

    • mountPath: the mount path. The mount path must be an absolute path that starts with a forward slash (/).

    • readOnly: the mount mode. The value true indicates the read-only mode. The value false indicates the read and write mode. Default value: false.

[{"pvcName":"nas-pvc-1","mountPaths":[{"mountPath":"/usr/share/nginx/data"},{"mountPath":"/usr/share/nginx/html","readOnly":true}]}]

Annotations

string

No

The annotation of an application pod.

{"annotation-name-1":"annotation-value-1","annotation-name-2":"annotation-value-2"}

Labels

string

No

The label of an application pod.

{"label-name-1":"label-value-1","label-name-2":"label-value-2"}

ImageUrl

string

No

The URL of the image.

registry.cn-hangzhou.aliyuncs.com/mw/testapp:latest

PackageUrl

string

No

The URL of the deployment package.

https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar

LocalVolume

string

No

The configurations that are used when the host files are mounted to the container on which the application is running. Example: \[{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt","mountPath":"/app/storage"}\]. Description:

  • nodePath: the host path.

  • mountPath: the path in the container.

  • type: the mounting type.

[{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt","mountPath":"/app/storage"}]

RegionId

string

No

The ID of the region.

cn-hangzhou

ComponentIds

string

No

The ID of the application component. You can call the ListComponents operation to query application components. This parameter must be specified when the application runs in Apache Tomcat or in a standard Java application runtime environment. The Apache Tomcat application runtime environment is applicable to Dubbo applications that are deployed by using WAR packages. A standard Java application runtime environment is applicable to Spring Boot or Spring Cloud applications that are deployed by using JAR packages.

Valid values for regular application component IDs:

  • 4: Apache Tomcat 7.0.91

  • 5: OpenJDK 1.8.x

  • 6: OpenJDK 1.7.x

  • 7: Apache Tomcat 8.5.42

This parameter is available only for Java SDK 2.57.3 or later, or Python SDK 2.57.3 or later. Assume that you use an SDK that is not provided by Enterprise Distributed Application Service (EDAS), such as aliyun-python-sdk-core, aliyun-java-sdk-core, and Alibaba Cloud CLI. In this case, you can directly specify this parameter.

7

Response elements

Element

Type

Description

Example

object

The returned content.

RequestId

string

The ID of the request.

7638276F-****-****-884F-54CC0BC84A8D

Code

integer

The HTTP status code.

200

Message

string

The returned message.

success

Data

object

The returned data.

Jobs

array

The jobs and the details about the jobs.

string

The name of the job.

Cluster health check.

Examples

Success response

JSON format

{
  "RequestId": "7638276F-****-****-884F-54CC0BC84A8D",
  "Code": 200,
  "Message": "success",
  "Data": {
    "Jobs": [
      "Cluster health check."
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

500 Edas.errorcode.PermissionDenied.message You are not authorized to perform the operation. No permissions

See Error CodesError Codes for a complete list.

Release notes

See Release NotesRelease Notes for a complete list.