tencent cloud

APIs

DescribeK8sApiAbnormalEventList

下载
聚焦模式
字号
最后更新时间: 2026-06-10 17:07:31

1. API Description

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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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.

  • TimeRange - String - Required: No - Time range filter ["2022-03-31 16:55:00", "2022-03-31 17:00:00"];
  • MatchRules - String - Required: No - Hit rule filter;
  • RiskLevel - String - Required: No - Threat level filter;
  • Status - String - Required: No - Event status filter;
  • MatchRuleType - String - Required: No - Hit rule type filter;
  • ClusterRunningStatus - String - Required: No - Cluster running status;
  • ClusterName - String - Required: No - Cluster name;
  • ClusterID - String - Required: No - Cluster ID.
  • 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.
    LatestFoundTime: Last generation time.
    AlarmCount: Number of alarms.

    3. Output Parameters

    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.

    4. Example

    Example1 Query the list of Kubernetes API exception events.

    Input Example

    POST / HTTP/1.1
    Host: tcss.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeK8sApiAbnormalEventList
    <Common request parameters>
    
    {}
    

    Output Example

    {
        "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
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    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.

    帮助和支持

    本页内容是否解决了您的问题?

    填写满意度调查问卷,共创更好文档体验。

    文档反馈