LeaseCandidate v1alpha1
apiVersion: coordination.k8s.io/v1alpha1
import "k8s.io/api/coordination/v1alpha1"
LeaseCandidate
LeaseCandidate 定義 Lease 物件的候選者。候選者被建立,以便協調領導者選舉將從候選者列表中選出最佳領導者。
apiVersion: coordination.k8s.io/v1alpha1
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 的規格。
leaseName (字串), 必要
LeaseName 是此候選者爭奪的租用名稱。此欄位是不可變的。
preferredStrategies ([]字串), 必要
原子性:將在合併期間被取代
PreferredStrategies 指出用於選取協調領導者選舉領導者的策略清單。此清單已排序,且第一個策略取代所有其他策略。協調領導者選舉使用此清單來決定最終的選舉策略。這遵循以下原則 - 如果所有用戶端都將策略 X 作為此清單中的第一個元素,則將使用策略 X。 - 如果一個候選者具有策略 [X],而另一個候選者具有策略 [Y, X],則 Y 取代 X,並且將使用策略 Y。
- 如果一個候選者具有策略 [X, Y],而另一個候選者具有策略 [Y, X],這是使用者錯誤,並且在解決之前,領導者選舉將不會操作 Lease。(Alpha) 使用此欄位需要啟用 CoordinatedLeaderElection 功能閘道。
binaryVersion (字串)
BinaryVersion 是二進位版本。它必須是沒有前導
v
的 semver 格式。當策略為 "OldestEmulationVersion" 時,此欄位為必填項emulationVersion (字串)
EmulationVersion 是模擬版本。它必須採用 semver 格式,且不帶前導
v
。EmulationVersion 必須小於或等於 BinaryVersion。當策略為 "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/v1alpha1
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/v1alpha1/namespaces/{namespace}/leasecandidates/{name}
參數
name (在路徑中): string, 必填
LeaseCandidate 的名稱
namespace (在路徑中): string, 必填
pretty (在查詢中): string
回應
200 (LeaseCandidate): 成功
401: 未經授權
list
列出或監看 LeaseCandidate 類型的物件
HTTP 請求
GET /apis/coordination.k8s.io/v1alpha1/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/v1alpha1/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/v1alpha1/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/v1alpha1/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/v1alpha1/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/v1alpha1/namespaces/{namespace}/leasecandidates/{name}
參數
name (在路徑中): string, 必填
LeaseCandidate 的名稱
namespace (在路徑中): string, 必填
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (在查詢中): integer
pretty (在查詢中): string
propagationPolicy (在查詢中): string
回應
200 (Status): 成功
202 (Status): 已接受
401: 未經授權
deletecollection
刪除 LeaseCandidate 集合
HTTP 請求
DELETE /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates
參數
namespace (在路徑中): string, 必填
body: DeleteOptions
continue (在查詢中): string
dryRun (在查詢中): string
fieldSelector (在查詢中): string
gracePeriodSeconds (在查詢中): integer
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
propagationPolicy (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
回應
200 (Status): 成功
401: 未經授權
此頁面為自動產生。
如果您計劃回報此頁面的問題,請在您的問題描述中提及此頁面為自動產生。修正可能需要在 Kubernetes 專案中的其他地方進行。