Patches node vulnerabilities in a node pool to enhance node security. Cloud Security provided by Alibaba Cloud periodically scans Elastic Compute Service (ECS) instances for vulnerabilities and provides suggestions on how to patch the detected vulnerabilities. Vulnerability patching may require node restarts. Make sure that your cluster has sufficient idle nodes for node draining.
Operation description
- The Common Vulnerabilities and Exposures (CVE) patching feature is developed based on Security Center. To use this feature, you must purchase the Security Center Ultimate Edition that supports Container Service for Kubernetes (ACK).
- ACK may need to restart nodes to patch certain vulnerabilities. ACK drains a node before the node restarts. Make sure that the ACK cluster has sufficient idle nodes to host the pods evicted from the trained nodes. For example, you can scale out a node pool before you patch vulnerabilities for the nodes in the node pool.
- Security Center ensures the compatibility of CVE patches. We recommend that you check the compatibility of a CVE patch with your application before you install the patch. You can pause or cancel a CVE patching task anytime.
- CVE patching is a progressive task that consists of multiple batches. After you pause or cancel a CVE patching task, ACK continues to process the dispatched batches. Only the batches that have not been dispatched are paused or canceled.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cs:FixNodePoolVuls | update | *Cluster acs:cs:{#regionId}:{#accountId}:cluster/{#cluster_id} |
| none |
Request syntax
POST /clusters/{cluster_id}/nodepools/{nodepool_id}/vuls/fix HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
cluster_id | string | Yes | The cluster ID. | cf62854ac2130470897be7a27ed1f**** |
nodepool_id | string | Yes | The node pool ID. | np31da1b38983f4511b490fc62108a**** |
body | object | No | The request body. | |
vuls | array | No | The list of vulnerabilities. | |
string | No | The name of the vulnerability. | oval:com.redhat.rhsa:def:20170574 | |
nodes | array | No | The names of the nodes to be patched. | |
string | No | The node name. | cn-beijing.10.0.1.26 | |
rollout_policy | object | No | The batch patching policy. | |
max_parallelism | long | No | The maximum concurrency for batch patching. Minimum value: 1. The maximum value equals the number of nodes in the node pool. | 1 |
auto_restart | boolean | No | Specifies whether to allow the nodes to restart. | true |
Response parameters
Examples
Sample success responses
JSON
format
{
"task_id": "T-60fea8ad2e277f087900****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-11-20 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-07-21 | The internal configuration of the API is changed, but the call is not affected | View Change Details |