Starts precheck for Kubernetes application changes.
Debugging
Authorization information
Request syntax
POST /pop/v5/k8s/app_precheck
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:
Specify Kubernetes ConfigMap environment variables in the following format to reference values from ConfigMaps:
Specify Kubernetes Secret environment variables in the following format to reference values from Secrets:
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:
| [{"name":"appname","valueFrom":{"configMapKeyRef":{"name":"appconf","key":"name"}}}] |
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":"/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
| {"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":"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":"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"}] |
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:
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 parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "7638276F-****-****-884F-54CC0BC84A8D",
"Code": 200,
"Message": "success",
"Data": {
"Jobs": [
"Cluster Health Check\n"
]
}
}
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 |
For a list of error codes, visit the Service error codes.