Domain name for API request: tcss.intl.tencentcloudapi.com.
This API is used to query the K8sApi abnormal event list.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: DescribeK8sApiAbnormalEventList. |
| Version | Yes | String | Common Params. The value used for this API: 2020-11-01. |
| Region | No | String | Common Params. This parameter is not required. |
| Filters.N | No | Array of RunTimeFilters | Filter conditions. |
| Limit | No | Integer | Number of items to return. The default number is 10, and the maximum number is 100. |
| Offset | No | Integer | Offset. Default value: 0. |
| Order | No | String | Sorting method. |
| By | No | String | Sorting field. |
| Parameter Name | Type | Description |
|---|---|---|
| List | Array of K8sApiAbnormalEventListItem | Event list. |
| TotalCount | Integer | Total quantity. |
| RuleTypeZhSet | Array of K8SAPIRuleTypeZhItem | K8s alarm types and corresponding descriptions. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: tcss.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeK8sApiAbnormalEventList
<Common request parameters>
{}
{
"Response": {
"List": [
{
"AlarmCount": 1,
"ClusterID": "cls-abhq0j4o-666",
"ClusterName": "clsfoo***",
"ClusterRunningStatus": "CSR_RUN****",
"Desc": "Anonymous user access requests to your K8s API Server have been detected. Attackers can exploit anonymous users to access cluster resources through the API Server, such as entering containers to run commands."
"FirstCreateTime": "2024-10-22T11:00:45Z",
"ID": 501472,
"LastCreateTime": "2024-10-22T11:00:45Z",
"MatchRule": {
"Action": "RULE_MODE_ALERT",
"IsDelete": false,
"RiskLevel": "HIGH",
"Scope": "{\"RequestUser\": \"system:anonymous\", \"RequestUserGroups\": \"system:anonymous\"}",
"Status": false
},
"MatchRuleType": "ANONYMOUS_ACCESS",
"RiskLevel": "HIGH",
"RuleName": "System rule",
"RuleType": "SYSTEM_DEFINED_RULE",
"Status": "EVENT_UNDEAL",
"Suggestion": "Enabling anonymous users poses relatively high risks. We recommend promptly disabling anonymous users to avoid exploitation by attackers. Also, check whether the source IP and the resources belong to normal maintenance operations. 1. Modify the API Server configuration file (for example: /etc/kubernetes/manifests/kube-apiserver.yaml) by changing anonymous-auth to false. Modify the bind-address to avoid listening on 0.0.0.0 or use security group limits. Remove the insecure-port configuration. 2. Disable the kubelet's JWT authentication feature, such as removing the anonymous-auth configuration in the kubelet service configuration file. Before modifying the configuration, confirm whether it meets business needs. Back up the configuration file before making changes."
}
],
"RequestId": "74b6dcb5-f38e-45f4-9f3f-be848b52466f",
"TotalCount": 218
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| InternalError | An internal error occurred. |
| InvalidParameter | The parameter is incorrect. |
文档反馈