DaemonSet
apiVersion: apps/v1
import "k8s.io/api/apps/v1"
DaemonSet
DaemonSet 代表一個守護程序集的配置。
apiVersion: apps/v1
kind: DaemonSet
metadata (ObjectMeta)
標準物件的元資料。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (DaemonSetSpec)
此守護程序集的期望行為。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status (DaemonSetStatus)
此守護程序集的當前狀態。此資料可能會在一段時間內過時。由系統填充。只讀。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
DaemonSetSpec
DaemonSetSpec 是守護程序集的規範。
selector (LabelSelector),必需
對由守護程序集管理的 Pod 進行的標籤查詢。必須匹配才能受到控制。它必須與 Pod 模板的標籤匹配。更多資訊:https://kubernetes.club.tw/docs/concepts/overview/working-with-objects/labels/#label-selectors
template (PodTemplateSpec),必需
描述將要建立的 Pod 的物件。DaemonSet 將在每個匹配模板節點選擇器的節點上(如果未指定節點選擇器,則在每個節點上)精確地建立一個該 Pod 的副本。唯一允許的 `template.spec.restartPolicy` 值是“Always”。更多資訊:https://kubernetes.club.tw/docs/concepts/workloads/controllers/replicationcontroller#pod-template
minReadySeconds (int32)
新建立的 DaemonSet Pod 在其任何容器未崩潰的情況下應保持就緒狀態的最短秒數,以便被視為可用。預設為 0(Pod 一旦就緒即被視為可用)。
updateStrategy (DaemonSetUpdateStrategy)
替換現有 DaemonSet Pod 的新 Pod 的更新策略。
DaemonSetUpdateStrategy 是一個用於控制 DaemonSet 更新策略的結構體。
updateStrategy.type (字串)
守護程序集更新型別。可以是“RollingUpdate”或“OnDelete”。預設是 RollingUpdate。
updateStrategy.rollingUpdate (RollingUpdateDaemonSet)
滾動更新配置引數。僅在 type = "RollingUpdate" 時存在。
updateStrategy.rollingUpdate.maxSurge (IntOrString)
在更新期間,已經有一個可用 DaemonSet Pod 的節點上,可以擁有一個已更新的 DaemonSet Pod 的最大節點數。值可以是絕對數字(例如:5)或所需 Pod 的百分比(例如:10%)。如果 MaxUnavailable 為 0,則此值不能為 0。絕對數字透過四捨五入到至少 1 來從百分比計算。預設值為 0。示例:當此設定為 30% 時,在舊 Pod 被標記為刪除之前,最多 30% 的應執行守護程序 Pod 的節點(即 status.desiredNumberScheduled)可以建立新 Pod。更新透過在 30% 的節點上啟動新 Pod 開始。一旦更新的 Pod 可用(至少在 minReadySeconds 內處於就緒狀態),該節點上的舊 DaemonSet Pod 將被標記為刪除。如果舊 Pod 因任何原因變得不可用(就緒狀態變為 false,被驅逐或被耗盡),則會在該節點上立即建立一個更新的 Pod,而不考慮激增限制。允許激增意味著如果就緒檢查失敗,任何給定節點上守護程序集消耗的資源可能會翻倍,因此資源密集型守護程序集應考慮到它們在中斷期間可能導致驅逐。
IntOrString 是一個可以容納 int32 或字串的型別。在 JSON 或 YAML 編組和解組時,它會生成或消費內部型別。這允許你擁有一個可以接受名稱或數字的 JSON 欄位,例如。
updateStrategy.rollingUpdate.maxUnavailable (IntOrString)
更新期間可以不可用的 DaemonSet Pod 的最大數量。值可以是絕對數字(例如:5)或更新開始時 DaemonSet Pod 總數的百分比(例如:10%)。絕對數字透過向上取整從百分比計算。如果 MaxSurge 為 0,則此值不能為 0。預設值為 1。示例:當此設定為 30% 時,在任何給定時間,最多 30% 的應執行守護程序 Pod 的節點(即 status.desiredNumberScheduled)的 Pod 可以停止進行更新。更新透過停止最多 30% 的這些 DaemonSet Pod 開始,然後在其位置啟動新的 DaemonSet Pod。一旦新 Pod 可用,它將繼續處理其他 DaemonSet Pod,從而確保在更新期間始終至少有 70% 的原始 DaemonSet Pod 可用。
IntOrString 是一個可以容納 int32 或字串的型別。在 JSON 或 YAML 編組和解組時,它會生成或消費內部型別。這允許你擁有一個可以接受名稱或數字的 JSON 欄位,例如。
revisionHistoryLimit (int32)
保留的舊歷史記錄的數量,以允許回滾。這是一個指標,用於區分顯式零和未指定。預設為 10。
DaemonSetStatus
DaemonSetStatus 表示守護程序集的當前狀態。
numberReady (int32), 必需
numberReady 是應執行守護程序 Pod 並且有一個或多個守護程序 Pod 處於就緒狀態的節點的數量。
numberAvailable (int32)
應執行守護程序 Pod 且有一個或多個守護程序 Pod 正在執行且可用的節點數量(至少就緒 spec.minReadySeconds)
numberUnavailable (int32)
應執行守護程序 Pod 但沒有守護程序 Pod 正在執行且可用的節點數量(至少就緒 spec.minReadySeconds)
numberMisscheduled (int32), 必需
正在執行守護程序 Pod 但不應執行守護程序 Pod 的節點數量。更多資訊:https://kubernetes.club.tw/docs/concepts/workloads/controllers/daemonset/
desiredNumberScheduled (int32), 必需
應執行守護程序 Pod 的節點總數(包括正確執行守護程序 Pod 的節點)。更多資訊:https://kubernetes.club.tw/docs/concepts/workloads/controllers/daemonset/
currentNumberScheduled (int32), 必需
正在執行至少 1 個守護程序 Pod 且應執行守護程序 Pod 的節點數量。更多資訊:https://kubernetes.club.tw/docs/concepts/workloads/controllers/daemonset/
updatedNumberScheduled (int32)
正在執行已更新守護程序 Pod 的節點總數
collisionCount (int32)
DaemonSet 的雜湊衝突計數。DaemonSet 控制器在需要為最新 ControllerRevision 建立名稱時,將此欄位用作衝突避免機制。
conditions ([]DaemonSetCondition)
補丁策略:按鍵
type
合併對映:合併時將保留鍵型別上的唯一值
表示 DaemonSet 當前狀態的最新可用觀察結果。
DaemonSetCondition 描述了 DaemonSet 在某個時間點的狀態。
conditions.status (string),必需
條件的 status,可以是 True、False、Unknown 之一。
conditions.type (string),必需
DaemonSet 條件的型別。
conditions.lastTransitionTime (Time)
條件上次從一種狀態轉換到另一種狀態的時間。
Time 是 time.Time 的一個包裝器,支援正確地編組到 YAML 和 JSON。提供了 time 包提供的許多工廠方法的包裝器。
conditions.message (string)
一個人類可讀的訊息,指示有關轉換的詳細資訊。
conditions.reason (string)
條件上次轉換的原因。
observedGeneration (int64)
守護程序集控制器觀察到的最新世代。
DaemonSetList
DaemonSetList 是守護程序集的集合。
apiVersion: apps/v1
kind: DaemonSetList
metadata (ListMeta)
標準列表元資料。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]DaemonSet), 必需
守護程序集列表。
操作
get
讀取指定的 DaemonSet
HTTP 請求
GET /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
引數
響應
200 (DaemonSet): 正常
401: 未授權
get
讀取指定 DaemonSet 的狀態
HTTP 請求
GET /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
引數
響應
200 (DaemonSet): 正常
401: 未授權
list
列出或監視 DaemonSet 型別的物件
HTTP 請求
GET /apis/apps/v1/namespaces/{namespace}/daemonsets
引數
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 (DaemonSetList): 正常
401: 未授權
list
列出或監視 DaemonSet 型別的物件
HTTP 請求
GET /apis/apps/v1/daemonsets
引數
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (DaemonSetList): 正常
401: 未授權
create
建立一個 DaemonSet
HTTP 請求
POST /apis/apps/v1/namespaces/{namespace}/daemonsets
引數
namespace (在路徑中): string,必填
body: DaemonSet, 必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (DaemonSet): 正常
201 (DaemonSet): 已建立
202 (DaemonSet): 已接受
401: 未授權
update
替換指定的 DaemonSet
HTTP 請求
PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
引數
name (在路徑中): string,必填
DaemonSet 的名稱
namespace (在路徑中): string,必填
body: DaemonSet, 必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (DaemonSet): 正常
201 (DaemonSet): 已建立
401: 未授權
update
替換指定 DaemonSet 的狀態
HTTP 請求
PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
引數
name (在路徑中): string,必填
DaemonSet 的名稱
namespace (在路徑中): string,必填
body: DaemonSet, 必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (DaemonSet): 正常
201 (DaemonSet): 已建立
401: 未授權
patch
部分更新指定的 DaemonSet
HTTP 請求
PATCH /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
引數
name (在路徑中): string,必填
DaemonSet 的名稱
namespace (在路徑中): string,必填
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (DaemonSet): 正常
201 (DaemonSet): 已建立
401: 未授權
patch
部分更新指定 DaemonSet 的狀態
HTTP 請求
PATCH /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
引數
name (在路徑中): string,必填
DaemonSet 的名稱
namespace (在路徑中): string,必填
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (DaemonSet): 正常
201 (DaemonSet): 已建立
401: 未授權
delete
刪除一個 DaemonSet
HTTP 請求
DELETE /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
引數
name (在路徑中): string,必填
DaemonSet 的名稱
namespace (在路徑中): string,必填
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
pretty (在查詢中): string
propagationPolicy (在查詢中): string
響應
200 (Status): OK
202 (Status): 已接受
401: 未授權
deletecollection
刪除 DaemonSet 集合
HTTP 請求
DELETE /apis/apps/v1/namespaces/{namespace}/daemonsets
引數
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 專案的其他地方進行。