Event
apiVersion: events.k8s.io/v1
import "k8s.io/api/events/v1"
Event
Event 是对集群中某个事件的报告。它通常表示系统中的某些状态变更。事件具有有限的保留时间,触发器和消息可能会随时间而变化。事件的消费者不应依赖具有给定 Reason 的事件的时间戳来反映一致的底层触发器,也不应依赖具有该 Reason 的事件的持续存在。事件应被视为提供信息的、尽最大努力的补充数据。
apiVersion: events.k8s.io/v1
kind: Event
metadata (ObjectMeta)
标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
eventTime (MicroTime), required
eventTime 是第一次观察到此 Event 的时间。此字段是必需的。
action (string)
action 是针对相关对象采取/失败的操作。它是机器可读的。新 Event 此字段不能为空,最多可包含 128 个字符。
deprecatedCount (int32)
deprecatedCount 是为保证与 core.v1 Event 类型向后兼容而保留的已弃用字段。
deprecatedFirstTimestamp (Time)
deprecatedFirstTimestamp 是为保证与 core.v1 Event 类型向后兼容而保留的已弃用字段。
Time 是 time.Time 的一个包装器,支持正确地编组到 YAML 和 JSON。提供了 time 包提供的许多工厂方法的包装器。
deprecatedLastTimestamp (Time)
deprecatedLastTimestamp 是为保证与 core.v1 Event 类型向后兼容而保留的已弃用字段。
Time 是 time.Time 的一个包装器,支持正确地编组到 YAML 和 JSON。提供了 time 包提供的许多工厂方法的包装器。
deprecatedSource (EventSource)
deprecatedSource 是为保证与 core.v1 Event 类型向后兼容而保留的已弃用字段。
deprecatedSource.component (string)
生成事件的组件。
deprecatedSource.host (string)
生成事件的节点名称。
note (string)
note 是此操作状态的人类可读描述。note 的最大长度为 1kB,但库应准备好处理高达 64kB 的值。
reason (string)
reason 是采取操作的原因。它是人类可读的。新 Event 此字段不能为空,最多可包含 128 个字符。
regarding (ObjectReference)
regarding 包含此 Event 所关联的对象。在大多数情况下,它是实现控制器所报告的对象,例如 ReplicaSetController 实现 ReplicaSets,并且此事件的发出是因为它针对 ReplicaSet 对象进行了一些更改。
related (ObjectReference)
related 是可选的次要对象,用于更复杂的操作。例如,当 regarding 对象触发了 related 对象的创建或删除时。
reportingController (string)
reportingController 是发出此 Event 的控制器名称,例如
kubernetes.io/kubelet
。新 Event 此字段不能为空。reportingInstance (string)
reportingInstance 是控制器实例的 ID,例如
kubelet-xyzf
。新 Event 此字段不能为空,最多可包含 128 个字符。series (EventSeries)
series 是此事件所代表的 Event 系列的数据,如果它是单一事件,则为 nil。
EventSeries 包含有关事件系列的信息,即某个持续发生的事情。事件报告器更新 EventSeries 的频率由事件报告器自行决定。"k8s.io/client-go/tools/events/event_broadcaster.go" 中的默认事件报告器显示了此结构如何在心跳时更新,并且可以指导自定义报告器实现。
type (string)
type 是此事件的类型(Normal、Warning),未来可能会添加新类型。它是机器可读的。新 Event 此字段不能为空。
EventList
EventList 是 Event 对象的列表。
apiVersion: events.k8s.io/v1
kind: EventList
metadata (ListMeta)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]Event), required
items 是 schema 对象的列表。
操作
get
读取指定的 Event
HTTP 请求
GET /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
参数
响应
200 (Event): OK
401: 未授权
list
列出或监视 Event 类型的对象
HTTP 请求
GET /apis/events.k8s.io/v1/namespaces/{namespace}/events
参数
namespace (在路径中): string,必填
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (EventList): OK
401: 未授权
list
列出或监视 Event 类型的对象
HTTP 请求
GET /apis/events.k8s.io/v1/events
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (EventList): OK
401: 未授权
create
创建一个 Event
HTTP 请求
POST /apis/events.k8s.io/v1/namespaces/{namespace}/events
参数
namespace (在路径中): string,必填
body: Event, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Event): OK
201 (Event): Created
202 (Event): Accepted
401: 未授权
update
替换指定的 Event
HTTP 请求
PUT /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
参数
name (在路径中): string,必填
Event 的名称
namespace (在路径中): string,必填
body: Event, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Event): OK
201 (Event): Created
401: 未授权
patch
部分更新指定的 Event
HTTP 请求
PATCH /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
参数
name (在路径中): string,必填
Event 的名称
namespace (在路径中): string,必填
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (Event): OK
201 (Event): Created
401: 未授权
delete
删除一个 Event
HTTP 请求
DELETE /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
参数
name (在路径中): string,必填
Event 的名称
namespace (在路径中): string,必填
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): 已接受
401: 未授权
deletecollection
删除 Event 集合
HTTP 请求
DELETE /apis/events.k8s.io/v1/namespaces/{namespace}/events
参数
namespace (在路径中): string,必填
body: DeleteOptions
continue (在查询中): string
dryRun (在查询中): string
fieldSelector (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): OK
401: 未授权
本页面是自动生成的。
如果你打算报告此页面存在的问题,请在问题描述中提及此页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。