查询Event列表
更新时间 2026-05-07 14:17:54
最近更新时间: 2026-05-07 14:17:54
接口功能介绍
调用该接口查询集群一小时内的事件列表。
接口约束
无
URI
GET /v2/cce/clusters//apis/events.k8s.io//events
路径参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| clusterId | 是 | String | 集群ID,获取方式请参见如何获取接口URI中参数。 | 47281b02f87757478f20b1827c97cadf | |
| apiVersion | 是 | String | 资源api的版本,请选择当前所操作集群支持的资源api版本,可参见Kubernetes版本与资源API版本对应表。 | v1 |
Query参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| labelSelector | 否 | String | Kubernetes labelSelector,可通过label过滤资源;label之间通过“,”分隔,特殊符号要转义为url编码,如“=”写为“%3D” | name%3Daaa | |
| fieldSelector | 否 | String | Kubernetes fieldSelector,可通过field过滤资源;label之间通过“,”分隔,特殊符号要转义为url编码,如“=”写为“%3D”,以下为过滤Event常用的key及其含义: | ||
| type:事件等级,有Normal和Warning两种等级 | |||||
| regarding.kind:产生事件资源的类型,如Pod、Node等 | |||||
| regarding.name:产生事件资源的名称 | |||||
| regarding.namesapce:产生事件资源所在的命名空间 | regarding.kind%3DPod,type%3DNormal |
请求参数
请求头header参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| regionId | 是 | String | 资源池ID,您可以查看地域和可用区来了解资源池 | ||
| 获取: | |||||
| 查 资源池列表查询 | bb9fdb42056f11eda1610242ac110002 |
请求体body参数 无
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 响应状态码 | 800 | |
| message | String | 响应信息 | success | |
| returnObj | String | 返回结果,yaml格式事件列表 | ||
| error | String | 错误码 | CCSE_500 |
枚举参数
无
请求示例
请求url
GET https://ccse-global.ctapi.ctyun.cn/v2/cce/clusters/9a0bc858cafd4090a45333f0c308fd5f/apis/events.k8s.io/v1/events?fieldSelector=regarding.kind%3DPod,type%3DNormal
请求头header
{
regionId:bb9fdb42056f11eda1610242ac110002
}
请求体body
无
响应示例
{
"code": 0,
"requestId": "804d7cc7-cd14-4e6b-bd7b-9a58f1153a79",
"statusCode": 800,
"message": "Successfully queried the list of cluster-level resources.",
"returnObj": "apiVersion: events.k8s.io/v1\nitems:\n- apiVersion: events.k8s.io/v1\n metadata:\n creationTimestamp: '2025-04-10T05:25:51Z'\n managedFields:\n - apiVersion: v1\n fieldsType: FieldsV1\n fieldsV1:\n f:firstTimestamp: {}\n f:message: {}\n f:reportingComponent: {}\n f:count: {}\n f:reportingInstance: {}\n f:type: {}\n f:involvedObject: {}\n f:lastTimestamp: {}\n f:reason: {}\n f:source:\n f:component: {}\n f:host: {}\n manager: kubelet\n operation: Update\n time: '2025-04-10T05:25:51Z'\n name: cstor-csi-nodeplugin-shbbb.183492257b6f58dc\n namespace: cstor\n resourceVersion: '18359853'\n uid: b6cc6a16-b013-4c2f-b204-475a409d8121\n eventTime: null\n reportingController: kubelet\n reportingInstance: test111-0222b\n reason: Pulling\n regarding: {kind: Pod, namespace: cstor, name: cstor-csi-nodeplugin-shbbb, uid: f991384a-4e15-4aa0-837c-b65e8b31fd95,\n apiVersion: v1, resourceVersion: '17794537', fieldPath: 'spec.containers{cstor-csiplugin}'}\n note: Pulling image \"registry-vpc-crs-huadong1.cnsp-internal.ctyun.cn/library/cstor-csi:v3.8.0-pub\"\n type: Normal\n deprecatedSource: {component: kubelet, host: test111-0222b}\n deprecatedFirstTimestamp: '2025-04-09T06:20:45Z'\n deprecatedLastTimestamp: '2025-04-10T05:25:51Z'\n deprecatedCount: 252\n- apiVersion: events.k8s.io/v1\n metadata:\n creationTimestamp: '2025-04-10T06:10:45Z'\n managedFields:\n - apiVersion: v1\n fieldsType: FieldsV1\n fieldsV1:\n f:firstTimestamp: {}\n f:message: {}\n f:count: {}\n f:type: {}\n f:involvedObject: {}\n f:lastTimestamp: {}\n f:reason: {}\n f:source:\n f:component: {}\n f:host: {}\n manager: kubelet\n operation: Update\n time: '2025-04-10T06:10:45Z'\n name: cstor-csi-nodeplugin-shbbb.18349258975274df\n namespace: cstor\n resourceVersion: '18378122'\n uid: 77d76fc0-da0a-425c-9b05-cb0fe9dbffa2\n eventTime: null\n reason: Pulled\n regarding: {kind: Pod, namespace: cstor, name: cstor-csi-nodeplugin-shbbb, uid: f991384a-4e15-4aa0-837c-b65e8b31fd95,\n apiVersion: v1, resourceVersion: '17794537', fieldPath: 'spec.containers{cstor-storagemanager-nodeserver}'}\n note: '(combined from similar events): Successfully pulled image \"registry-vpc-crs-huadong1.cnsp-internal.ctyun.cn/library/cstor-storagemanager:v1.0.1\"\n in 397.148009ms (397.153699ms including waiting)'\n type: Normal\n deprecatedSource: {component: kubelet, host: test111-0222b}\n deprecatedFirstTimestamp: '2025-04-09T06:24:24Z'\n deprecatedLastTimestamp: '2025-04-10T06:10:45Z'\n deprecatedCount: 512\n- apiVersion: events.k8s.io/v1\n metadata:\n creationTimestamp: '2025-04-10T05:58:19Z'\n managedFields:\n - apiVersion: v1\n fieldsType: FieldsV1\n fieldsV1:\n f:firstTimestamp: {}\n f:message: {}\n f:reportingComponent: {}\n f:count: {}\n f:reportingInstance: {}\n f:type: {}\n f:involvedObject: {}\n f:lastTimestamp: {}\n f:reason: {}\n f:source:\n f:component: {}\n f:host: {}\n manager: kubelet\n operation: Update\n time: '2025-04-10T05:58:19Z'\n name: amss-mall-beijing-1-569444ccfb-kds56.183443281e177b5c\n namespace: default\n resourceVersion: '18373066'\n uid: 5a01f82d-7688-4f82-a70d-f390d9ee16fd\n eventTime: null\n reportingController: kubelet\n reportingInstance: default-4fec3\n reason: Pulling\n regarding: {kind: Pod, namespace: default, name: amss-mall-beijing-1-569444ccfb-kds56,\n uid: 0462fcfc-6cea-4574-8fb9-edddffda1761, apiVersion: v1, resourceVersion: '17338508',\n fieldPath: 'spec.containers{amss-mall-beijing-1}'}\n note: Pulling image \"registry-huadong1.crs-internal.ctyun.cn/amss/mall:1.0\"\n type: Normal\n deprecatedSource: {component: kubelet, host: default-4fec3}\n deprecatedFirstTimestamp: '2025-04-08T06:13:15Z'\n deprecatedLastTimestamp: '2025-04-10T05:58:19Z'\n deprecatedCount: 545\n- apiVersion: events.k8s.io/v1\n metadata:\n creationTimestamp: '2025-04-10T05:28:23Z'\n managedFields:\n - apiVersion: v1\n fieldsType: FieldsV1\n fieldsV1:\n f:firstTimestamp: {}\n f:message: {}\n f:reportingComponent: {}\n f:count: {}\n f:reportingInstance: {}\n f:type: {}\n f:involvedObject: {}\n f:lastTimestamp: {}\n f:reason: {}\n f:source:\n f:component: {}\n f:host: {}\n manager: kubelet\n operation: Update\n time: '2025-04-10T05:28:23Z'\n name: amss-member-guangzhou-1-868b7f9d99-hrnms.18344327bf24658e\n namespace: default\n resourceVersion: '18360882'\n uid: 843ea319-03b2-4322-8dde-232bcb4d52a0\n eventTime: null\n reportingController: kubelet\n reportingInstance: default-b2223\n reason: Pulling\n regarding: {kind: Pod, namespace: default, name: amss-member-guangzhou-1-868b7f9d99-hrnms,\n uid: c2b47a9d-55e0-4438-a58c-32d8cde5bd7f, apiVersion: v1, resourceVersion: '17338488',\n fieldPath: 'spec.containers{amss-member-guangzhou-1}'}\n note: Pulling image \"registry-huadong1.crs-internal.ctyun.cn/amss/member:1.0\"\n type: Normal\n deprecatedSource: {component: kubelet, host: default-b2223}\n deprecatedFirstTimestamp: '2025-04-08T06:13:13Z'\n deprecatedLastTimestamp: '2025-04-10T05:28:23Z'\n deprecatedCount: 540\n- apiVersion: events.k8s.io/v1\n metadata:\n creationTimestamp: '2025-04-10T05:43:17Z'\n managedFields:\n - apiVersion: v1\n fieldsType: FieldsV1\n fieldsV1:\n f:firstTimestamp: {}\n f:message: {}\n f:reportingComponent: {}\n f:count: {}\n f:reportingInstance: {}\n f:type: {}\n f:involvedObject: {}\n f:lastTimestamp: {}\n f:reason: {}\n f:source:\n f:component: {}\n f:host: {}\n manager: kubelet\n operation: Update\n time: '2025-04-10T05:43:17Z'\n name: amss-order-beijing-1-54c9755f97-56dtd.183443289350fbd2\n namespace: default\n resourceVersion: '18366952'\n uid: afca9200-331f-4b8a-b3dc-139d6f64080b\n eventTime: null\n reportingController: kubelet\n reportingInstance: default-4fec3\n reason: Pulling\n regarding: {kind: Pod, namespace: default, name: amss-order-beijing-1-54c9755f97-56dtd,\n uid: b8558519-ca9c-4846-957d-bea3bfa1ff93, apiVersion: v1, resourceVersion: '17338542',\n fieldPath: 'spec.containers{amss-order-beijing-1}'}\n note: Pulling image \"registry-huadong1.crs-internal.ctyun.cn/amss/order:1.0\"\n type: Normal\n deprecatedSource: {component: kubelet, host: default-4fec3}\n deprecatedFirstTimestamp: '2025-04-08T06:13:17Z'\n deprecatedLastTimestamp: '2025-04-10T05:43:17Z'\n deprecatedCount: 543\n- apiVersion: events.k8s.io/v1\n metadata:\n creationTimestamp: '2025-04-10T05:46:51Z'\n managedFields:\n - apiVersion: v1\n fieldsType: FieldsV1\n fieldsV1:\n f:firstTimestamp: {}\n f:message: {}\n f:reportingComponent: {}\n f:count: {}\n f:reportingInstance: {}\n f:type: {}\n f:involvedObject: {}\n f:lastTimestamp: {}\n f:reason: {}\n f:source:\n f:component: {}\n f:host: {}\n manager: kubelet\n operation: Update\n time: '2025-04-10T05:46:51Z'\n name: cubecni-dxnxh.183443e8bdc94db4\n namespace: kube-system\n resourceVersion: '18368402'\n uid: ff750155-ff09-4a74-b0c3-a65ed0e116b7\n eventTime: null\n reportingController: kubelet\n reportingInstance: test111-0222b\n reason: Pulled\n regarding: {kind: Pod, namespace: kube-system, name: cubecni-dxnxh, uid: cef72efa-f873-4fb8-b871-13c469519cb6,\n apiVersion: v1, resourceVersion: '17343438', fieldPath: 'spec.containers{cubecni-daemon}'}\n note: Container image \"registry-vpc-crs-huadong1.cnsp-internal.ctyun.cn/library/cubecni-daemon:v1.1.4\"\n already present on machine\n type: Normal\n deprecatedSource: {component: kubelet, host: test111-0222b}\n deprecatedFirstTimestamp: '2025-04-08T06:27:02Z'\n deprecatedLastTimestamp: '2025-04-10T05:46:51Z'\n deprecatedCount: 482\n- apiVersion: events.k8s.io/v1\n metadata:\n creationTimestamp: '2025-04-08T06:27:17Z'\n managedFields:\n - apiVersion: v1\n fieldsType: FieldsV1\n fieldsV1:\n f:firstTimestamp: {}\n f:message: {}\n f:reportingComponent: {}\n f:count: {}\n f:reportingInstance: {}\n f:type: {}\n f:involvedObject: {}\n f:lastTimestamp: {}\n f:reason: {}\n f:source:\n f:component: {}\n f:host: {}\n manager: kubelet\n operation: Update\n time: '2025-04-10T06:16:54Z'\n name: lmtagent-ds-fz794.183443ec01b1844a\n namespace: kube-system\n resourceVersion: '18380624'\n uid: 996e2efa-0692-4a22-bc54-46b64f6be653\n eventTime: null\n reportingController: kubelet\n reportingInstance: test111-0222b\n reason: SandboxChanged\n regarding: {kind: Pod, namespace: kube-system, name: lmtagent-ds-fz794, uid: 49cc7df5-43f2-4655-8b78-19703e8c3f09,\n apiVersion: v1, resourceVersion: '17343448'}\n note: Pod sandbox changed, it will be killed and re-created.\n type: Normal\n deprecatedSource: {component: kubelet, host: test111-0222b}\n deprecatedFirstTimestamp: '2025-04-08T06:27:16Z'\n deprecatedLastTimestamp: '2025-04-10T06:16:54Z'\n deprecatedCount: 13242\nkind: EventList\nmetadata: {resourceVersion: '18382445'}\n"
}
状态码
请参考 状态码
错误码
请参考 错误码