一个完整的K8s事件json格式
Posted aguncn
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了一个完整的K8s事件json格式相关的知识,希望对你有一定的参考价值。
这是进行之后工作的基础,要一个一个认识。
reason和message最重要。
2020-03-29T06:24:29Z default sahara-pc fb3006b9-ff20-48a7-8651-b419d2d2617f eventrouter-78cb89d979-7lxfg 5ffc3e1f-3653-41ce-905c-a77418f1a2b2 { "metadata": { "name": "eventrouter-78cb89d979-7lxfg.1600b242e53abf28", "namespace": "kube-system", "selfLink": "/api/v1/namespaces/kube-system/events/eventrouter-78cb89d979-7lxfg.1600b242e53abf28", "uid": "5ffc3e1f-3653-41ce-905c-a77418f1a2b2", "resourceVersion": "11600", "creationTimestamp": "2020-03-29T06:24:29Z" }, "involvedObject": { "kind": "Pod", "namespace": "kube-system", "name": "eventrouter-78cb89d979-7lxfg", "uid": "fb3006b9-ff20-48a7-8651-b419d2d2617f", "apiVersion": "v1", "resourceVersion": "11592", "fieldPath": "spec.containers{kube-eventrouter}" }, "reason": "Started", "message": "Started container kube-eventrouter", "source": { "component": "kubelet", "host": "sahara-pc" }, "firstTimestamp": "2020-03-29T06:24:29Z", "lastTimestamp": "2020-03-29T06:24:29Z", "count": 1, "type": "Normal", "eventTime": null, "reportingComponent": "", "reportingInstance": "" }
2020-03-29T06:25:35Z default sahara-pc e886983c-d8ef-4ee7-b21d-d4cc4b1fd430 nginx-868d6c4f67-hglhj d9110422-10df-4e84-9370-772c7aad7b78 { "metadata": { "name": "nginx-868d6c4f67-hglhj.1600b252384329bc", "namespace": "default", "selfLink": "/api/v1/namespaces/default/events/nginx-868d6c4f67-hglhj.1600b252384329bc", "uid": "d9110422-10df-4e84-9370-772c7aad7b78", "resourceVersion": "11657", "creationTimestamp": "2020-03-29T06:25:35Z" }, "involvedObject": { "kind": "Pod", "namespace": "default", "name": "nginx-868d6c4f67-hglhj", "uid": "e886983c-d8ef-4ee7-b21d-d4cc4b1fd430", "apiVersion": "v1", "resourceVersion": "10665", "fieldPath": "spec.containers{nginx}" }, "reason": "Killing", "message": "Stopping container nginx", "source": { "component": "kubelet", "host": "sahara-pc" }, "firstTimestamp": "2020-03-29T06:25:35Z", "lastTimestamp": "2020-03-29T06:25:35Z", "count": 1, "type": "Normal", "eventTime": null, "reportingComponent": "", "reportingInstance": "" }
1585473981000000000 default sahara-pc d976c73d-d9b5-4436-bb86-71abe558614f nginx-868d6c4f67-469bx 43da9c93-d79a-466a-8290-5979e1b3b7ca { "metadata": { "name": "nginx-868d6c4f67-469bx.1600bc2f80bc6a5b", "namespace": "default", "selfLink": "/api/v1/namespaces/default/events/nginx-868d6c4f67-469bx.1600bc2f80bc6a5b", "uid": "43da9c93-d79a-466a-8290-5979e1b3b7ca", "resourceVersion": "19389", "creationTimestamp": "2020-03-29T09:26:21Z" }, "involvedObject": { "kind": "Pod", "namespace": "default", "name": "nginx-868d6c4f67-469bx", "uid": "d976c73d-d9b5-4436-bb86-71abe558614f", "apiVersion": "v1", "resourceVersion": "19380", "fieldPath": "spec.containers{nginx}" }, "reason": "Created", "message": "Created container nginx", "source": { "component": "kubelet", "host": "sahara-pc" }, "firstTimestamp": "2020-03-29T09:26:21Z", "lastTimestamp": "2020-03-29T09:26:21Z", "count": 1, "type": "Normal", "eventTime": null, "reportingComponent": "", "reportingInstance": "" }
以上是关于一个完整的K8s事件json格式的主要内容,如果未能解决你的问题,请参考以下文章