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 專案的其他地方進行。