This topic describes the types of Container Service for Kubernetes (ACK) events that can be published to EventBridge.

Usage notes

ACK events are from the following two event sources:

  • ARMS
    • You must install the Application Real-Time Monitoring Service (ARMS) Prometheus component in Kubernetes clusters. For more information, see Enable ARMS Prometheus.
    • These events are of the cs:k8s:K8s-event-via-arms type and are not classified into specific types.
  • NPD
    • You must install the ack-node-problem-detector component in Kubernetes clusters. For more information, see the "Step 1: Deploy NPD" section of the Create a Kubernetes event center for an external Kubernetes cluster topic.
    • These events are classified by resource type. For example, events of the cs:k8s:PodRelatedEvent type are events related to pods.

Event types

The following table describes the types of ACK events that can be published to EventBridge.

Event type Value of the type parameter
Operations performed by Alibaba Cloud on resources cs:ActionTrail:AliyunServiceEvent
API operation calls cs:ActionTrail:ApiCall
Operations performed in the console cs:ActionTrail:ConsoleOperation
ACK events related to ConfigMaps cs:k8s:ConfigMapRelatedEvent
ACK events related to cron jobs cs:k8s:CronJobRelatedEvent
ACK events related to DaemonSets cs:k8s:DaemonSetRelatedEvent
ACK events related to deployments cs:k8s:DeploymentRelatedEvent
ACK events related to ingresses cs:k8s:IngressRelatedEvent
ACK events related to jobs cs:k8s:JobRelatedEvent
ACK events collected by ARMS cs:k8s:k8s-event-via-arms
ACK events related to namespaces cs:k8s:NamespaceRelatedEvent
ACK events related to nodes cs:k8s:NodeRelatedEvent
ACK events related to persistent volume claims (PVCs) cs:k8s:PersistentVolumeClaimRelatedEvent
ACK events related to persistent volumes (PVs) cs:k8s:PersistentVolumeRelatedEvent
ACK events related to pods cs:k8s:PodRelatedEvent
ACK events related to replica sets cs:k8s:ReplicaSetRelatedEvent
ACK events related to replication controllers cs:k8s:ReplicationControllerRelatedEvent
ACK events related to StatefulSets cs:k8s:StatefulSetRelatedEvent

For more information about the parameters defined in the CloudEvents specification, see Overview.

Notice The preceding table describes only common types of ACK events. You can use a custom rule to match the events that are not described in the preceding table. You can also filter and view all the event types.

The types of ACK events are named in the format of cs:k8s:{Resource type name}RelatedEvent. For example, for ACK events related to pods, the value of the type parameter is cs:k8s:PodRelatedEvent.

ACK events collected by ARMS

The following example shows the ACK event collected by ARMS and received by EventBridge:

{
    "id":"4cf9678d-dfec-4d6e-9fd1-a9a2d205****",
    "source":"acs.cs",
    "time":"2020-11-19T21:04:41+08:00",
    "data":{
        "reason":"FailedCreatePodSandBox",
        "involvedObject":{
            "uid":"e0a7e4b6-5331-487f-bb0a-e69647a9****",
            "apiVersion":"v1",
            "kind":"Pod",
            "resourceVersion":"40326010",
            "namespace":"kube-system",
            "name":"alicloud-application-controller-798784bf49-v88hc"
        },
        "count":1,
        "source":{
            "component":"kubelet",
            "host":"cn-hangzhou.192.168.XX.XX"
        },
        "message":"Failed to create pod sandbox",
        "type":"Warning",
        "firstTimestamp":"2020-11-19T21:04:41Z",
        "lastTimestamp":"2020-11-19T21:04:41Z"
    },
    "specversion":"1.0",
    "datacontenttype":"application/json",
    "type":"cs:k8s:K8s-event-via-arms",
    "aliyunaccountid":"123456789098****",
    "aliyuneventbusname":"default",
    "aliyunpublishtime":"2020-11-19T21:04:42.179PRC",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
reason String FailedCreatePodSandBox The reason why the ACK event was reported.
involvedObject Struct The object involved in the event.
uid String e0a7e4b6-5331-487f-bb0a-e69647a9**** The unique ID of the resource.
apiVersion String v1 The version of the API.
kind String Pod The type of the resource.
resourceVersion String 40326010 The version of the resource.
namespace String kube-system The namespace where the resource resides.
name String alicloud-application-controller-798784bf49-v88hc The name of the resource.
count Integer 1 The total number of occurrences of the event.
source Struct The resource that detects the event.
component String kubelet The type of the event source that the source parameter specifies.
host String cn-hangzhou.192.168.XX.XX The unique ID of the event source that the source parameter specifies.
message String Failed to create pod sandbox The description of the event.
type String Warning The severity of the event.
Valid values:
  • Warning
  • Normal
firstTimestamp Timestamp 2020-11-19T21:04:41Z The time of the first occurrence of the event.
lastTimestamp Timestamp 2020-11-19T21:04:41Z The time of the last occurrence of the event.

ACK events related to pods

The following example shows the ACK event related to pods and received by EventBridge:

{
    "datacontenttype":"application/json",
    "aliyunaccountid":"123456789098****",
    "data":{
        "reason":"BackOff",
        "metadata":{
            "uid":"0a2d6413-ea4a-414b-a813-aa9b6a17****",
            "resourceVersion":"1163710",
            "creationTimestamp":"2021-01-08T07:11:52Z",
            "name":"oom-test",
            "namespace":"default"
        },
        "involvedObject":{
            "uid":"3438fea9-1e54-4f71-aec5-6e874136****",
            "apiVersion":"v1",
            "kind":"Pod",
            "resourceVersion":"425592514",
            "name":"oom-test-85b",
            "namespace":"default"
        },
        "reportingInstance":"",
        "count":197,
        "source":{
            "component":"kubelet",
            "host":"cn-hangzhou.172.16.XX.XX"
        },
        "message":"Back-off restarting failed container",
        "type":"Warning",
        "reportingComponent":"",
        "firstTimestamp":"2021-01-08T07:11:52Z",
        "lastTimestamp":"2021-01-08T07:56:41Z"
    },
    "subject":"acs:cs:cn-hangzhou:123456789098****:abc/apis/v1/namespaces/default/pods/oom-test-85b",
    "source":"acs.cs",
    "type":"cs:k8s:PodRelatedEvent",
    "aliyunpublishtime":"2021-01-18T09:43:58.785Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"af182bae-16b8-4327-bb3a-a972de72****",
    "time":"2021-01-08T15:57:00+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
reason String BackOff The reason why the ACK event related to pods occurred.
metadata Struct The metadata of the event.
uid String 0a2d6413-ea4a-414b-a813-aa9b6a17**** The unique ID of the event in the Kubernetes cluster.
resourceVersion Integer 1163710 The version of the event. The version number sequentially increases each time the event is modified.
creationTimestamp Timestamp 2021-01-08T07:11:52Z The timestamp when the event was created for the first time.
name String oom-test The name of the event.
namespace String default The namespace to which the event belongs.
involvedObject Struct The object involved in the event.
uid String 3438fea9-1e54-4f71-aec5-6e874136**** The unique ID of the resource.
apiVersion String v1 The version of the API.
kind String Pod The type of the resource.
resourceVersion String 40326010 The version of the resource.
namespace String default The namespace where the resource resides.
name String oom-test-85b6c9494b-hpllq The name of the resource.
reportingInstance String N/A The instance that initiated the event.
count Integer 197 The total number of occurrences of the event.
source Struct The resource that detects the event.
component String kubelet The type of the event source that the source parameter specifies.
host String cn-hangzhou.172.16.XX.XX The unique ID of the event source that the source parameter specifies.
message String Back-off restarting failed container The description of the event.
type String Warning The severity of the event.
Valid values:
  • Warning
  • Normal
reportingComponent String N/A The component that initiated the event.
firstTimestamp Timestamp 2021-01-08T07:11:52Z The time of the first occurrence of the event.
lastTimestamp Timestamp 2021-01-08T07:56:41Z The time of the last occurrence of the event.