LeaseCandidate v1beta1
apiVersion: coordination.k8s.io/v1beta1
import "k8s.io/api/coordination/v1beta1"
LeaseCandidate
LeaseCandidate 定義了 Lease 物件的候選者。建立候選者的目的是為了讓協調式領導者選舉從候選者列表中選出最佳領導者。
apiVersion: coordination.k8s.io/v1beta1
kind: LeaseCandidate
metadata (ObjectMeta)
更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (LeaseCandidateSpec)
spec 包含 Lease 的規範。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
LeaseCandidateSpec
LeaseCandidateSpec 是 Lease 的規範。
binaryVersion (string),必需
BinaryVersion 是二進位制版本。它必須是 semver 格式,不帶前導
v
。此欄位是必需的。leaseName (string),必需
LeaseName 是此候選者所競爭的 Lease 的名稱。此欄位的限制與 Lease.name 的限制相同。多個 Lease 候選者可以引用相同的 Lease.name。此欄位是不可變的。
strategy (string),必需
Strategy 是協調式領導者選舉將用於選擇領導者的策略。如果同一 Lease 的多個候選者返回不同的策略,則將使用具有最新 BinaryVersion 的候選者提供的策略。如果仍然存在衝突,則這是一個使用者錯誤,協調式領導者選舉將不會操作 Lease,直到問題解決。
emulationVersion (string)
EmulationVersion 是模擬版本。它必須是 semver 格式,不帶前導
v
。EmulationVersion 必須小於或等於 BinaryVersion。當 strategy 為 "OldestEmulationVersion" 時,此欄位是必需的。pingTime (MicroTime)
PingTime 是伺服器要求 LeaseCandidate 續訂的最後時間。它僅在領導者選舉期間執行,以檢查是否有任何 LeaseCandidate 變得不合格。當 PingTime 更新時,LeaseCandidate 將透過更新 RenewTime 來響應。
renewTime (MicroTime)
RenewTime 是 LeaseCandidate 最後更新的時間。任何時候 Lease 需要進行領導者選舉,PingTime 欄位都會更新,以向 LeaseCandidate 發出訊號,表示它們應該更新 RenewTime。如果自上次續訂以來已過去數小時,舊的 LeaseCandidate 物件也將被垃圾回收。PingTime 欄位會定期更新,以防止仍在活動的 LeaseCandidate 被垃圾回收。
LeaseCandidateList
LeaseCandidateList 是 Lease 物件的列表。
apiVersion: coordination.k8s.io/v1beta1
kind: LeaseCandidateList
metadata (ListMeta)
標準列表元資料。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]LeaseCandidate),必需
items 是 schema 物件的列表。
操作
get
讀取指定的 LeaseCandidate
HTTP 請求
GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
引數
響應
200 (LeaseCandidate): 確定
401: 未授權
list
列出或監視 LeaseCandidate 型別的物件
HTTP 請求
GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
引數
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 (LeaseCandidateList): 確定
401: 未授權
list
列出或監視 LeaseCandidate 型別的物件
HTTP 請求
GET /apis/coordination.k8s.io/v1beta1/leasecandidates
引數
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (LeaseCandidateList): 確定
401: 未授權
create
建立一個 LeaseCandidate
HTTP 請求
POST /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
引數
namespace (在路徑中): string,必填
body: LeaseCandidate,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (LeaseCandidate): 確定
201 (LeaseCandidate): 已建立
202 (LeaseCandidate): 已接受
401: 未授權
update
替換指定的 LeaseCandidate
HTTP 請求
PUT /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
引數
name (在路徑中): string,必填
LeaseCandidate 的名稱
namespace (在路徑中): string,必填
body: LeaseCandidate,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (LeaseCandidate): 確定
201 (LeaseCandidate): 已建立
401: 未授權
patch
部分更新指定的 LeaseCandidate
HTTP 請求
PATCH /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
引數
name (在路徑中): string,必填
LeaseCandidate 的名稱
namespace (在路徑中): string,必填
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (LeaseCandidate): 確定
201 (LeaseCandidate): 已建立
401: 未授權
delete
刪除一個 LeaseCandidate
HTTP 請求
DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
引數
name (在路徑中): string,必填
LeaseCandidate 的名稱
namespace (在路徑中): string,必填
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
pretty (在查詢中): string
propagationPolicy (在查詢中): string
響應
200 (Status): OK
202 (Status): 已接受
401: 未授權
deletecollection
刪除 LeaseCandidate 集合
HTTP 請求
DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
引數
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 專案的其他地方進行。