All Products
Search
Document Center

DeployK8sApplicationRequest

Last Updated: Jan 17, 2019

Function

Deploy a Kubernetes application of Container Service.

Request URL

/pop/v5/k8s/acs/k8s_apps

Request method

POST

Request parameters

Parameter Type Required? Description
AppId String Yes Application ID, which can be obtained by the ListApplicationRequest API
Image String Yes Image complete URL, which overwrites the ImageTag parameter
ImageTag String Yes Image tag
BatchWaitTime Integer No Minimum interval between POD updates For more information, see minReadySeconds.
Replicas Integer No Number of application instancesThe minimum value is 0.
Command String No Startup command of the container This parameter must be set to the empty string "" to clear it.
Args String No Args command for starting the container, which must be in JSON array format
["parameter 1","parameter 2"]
The key must be a string.
This parameter must be set to the empty string "[]" in JSON array format to clear it.
Envs String No Application environment variable, which must be in JSON array format
[{"name":"x","value":"y"},{"name":"x2","value":"y2"}]
The key must be name or value.
This parameter must be set to the empty string "[]" in JSON array format to clear it.
CpuLimit Integer No CPU limit for the application instance when the application is running, in unit of cores. If the parameter value is 0, no CPU limit is posed.
MemoryLimit Integer No Memory limit for the application instance when the application is running, in unit of MB. If the parameter value is 0, no memory limit is posed.
CpuRequest Integer No Requested CPU quota for the application instance when the application is running, in unit of cores. If the parameter value is 0, no CPU quota is required.
MemoryRequest Integer No Requested memory quota for the application instance when the application is running, in unit of MB.If the parameter value is 0, no CPU quota is required.
liveness String No Container liveness status monitoring, format: {"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080}}
readiness String No Container readiness status check. If the check fails, the traffic passing through the Kubernetes service is not transmitted to the container. The parameter is in the format of {"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": [{"name": "test","value": "testvalue"}]}}.
postStart String No Post-start script, format: {"exec":{"command":["cat","/etc/group"]}}
preStop String No Pre-stop script, format: {"tcpSocket":{"host":"", "port":8080}}
nasId String No ID of the mounted NAS, which must be in the same region as the Kubernetes cluster.The quota for creating an NAS mount point must be available or an NAS mount point is deployed on the switch in VPC.If this parameter is not set and the mountDescs field is available, EDAS automatically buys an NAS and mounts it to the switch in VPC.
mountDescs String No Mount configuration description, which is a serialized string in JSON array format, for example, [{"nasPath": "/k8s","mountPath": "/mnt"},{"nasPath": "/files","mountPath": "/app/files"}].Where, nasPath indicates the file storage path and mountPath indicates the mount path to the container.
storageType String No SSD supported only, Performance.
localvolume String No Configuration for mounting host files to the container, for example, [{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt","mountPath":"/app/storage"}].Where, nodePath indicates the host path, mountPath indicates the mount path to the container, and type indicates the mount type. For more information, see Host storage type description.

NOTE: The request parameters are case sensitive.

Response parameters

Parameter Type Description
RequestId String Unique request ID
Code Integer Code
Message String Message
ChangeOrderId String Call the GetChangeOrderInfoRequest API to display the deployment progress.