HorizontalPodAutoscaler
apiVersion: autoscaling/v1
import "k8s.io/api/autoscaling/v1"
HorizontalPodAutoscaler
水平 Pod 自動擴縮器的配置。
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata (ObjectMeta)
標準物件元資料。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (HorizontalPodAutoscalerSpec)
spec 定義了自動擴縮器的行為。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status。
status (HorizontalPodAutoscalerStatus)
status 是關於自動擴縮器的當前資訊。
HorizontalPodAutoscalerSpec
水平 Pod 自動擴縮器的規格。
maxReplicas (int32),必填
maxReplicas 是自動擴縮器可以設定的 Pod 數量上限;不能小於 MinReplicas。
scaleTargetRef (CrossVersionObjectReference),必填
指向要擴縮的資源的引用;水平 Pod 自動擴縮器將透過其 Scale 子資源學習當前資源消耗並設定所需的 Pod 數量。
CrossVersionObjectReference 包含足夠的資訊,讓您可以識別所引用的資源。
scaleTargetRef.kind (string),必填
kind 是被引用物件的種類;更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
scaleTargetRef.name (string),必填
name 是被引用物件的名稱;更多資訊:https://kubernetes.club.tw/docs/concepts/overview/working-with-objects/names/#names
scaleTargetRef.apiVersion (string)
apiVersion 是被引用物件的 API 版本
minReplicas (int32)
minReplicas 是自動擴縮器可以縮小的副本數量下限。預設值為 1 個 Pod。如果啟用了 alpha 特性門 HPAScaleToZero 且至少配置了一個 Object 或 External 指標,則 minReplicas 允許為 0。只要至少有一個指標值可用,擴縮就會一直活躍。
targetCPUUtilizationPercentage (int32)
targetCPUUtilizationPercentage 是所有 Pod 的目標平均 CPU 利用率(表示為請求 CPU 的百分比);如果未指定,將使用預設的自動擴縮策略。
HorizontalPodAutoscalerStatus
水平 Pod 自動擴縮器的當前狀態
currentReplicas (int32),必填
currentReplicas 是此自動擴縮器管理的 Pod 的當前副本數量。
desiredReplicas (int32),必填
desiredReplicas 是此自動擴縮器管理的 Pod 的期望副本數量。
currentCPUUtilizationPercentage (int32)
currentCPUUtilizationPercentage 是所有 Pod 的當前平均 CPU 利用率,表示為請求 CPU 的百分比,例如 70 表示平均每個 Pod 現在使用了其請求 CPU 的 70%。
lastScaleTime (Time)
lastScaleTime 是 HorizontalPodAutoscaler 上次擴縮 Pod 數量的時間;自動擴縮器使用它來控制 Pod 數量更改的頻率。
Time 是 time.Time 的一個包裝器,支援正確地編組到 YAML 和 JSON。提供了 time 包提供的許多工廠方法的包裝器。
observedGeneration (int64)
observedGeneration 是此自動擴縮器觀察到的最新生成。
HorizontalPodAutoscalerList
水平 Pod 自動擴縮器物件列表。
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscalerList
metadata (ListMeta)
標準列表元資料。
items ([]HorizontalPodAutoscaler),必填
items 是水平 Pod 自動擴縮器物件的列表。
操作
get
讀取指定的 HorizontalPodAutoscaler
HTTP 請求
GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
引數
name (在路徑中): string,必填
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): string,必填
pretty (在查詢中): string
響應
200 (HorizontalPodAutoscaler): 成功
401: 未授權
get
讀取指定 HorizontalPodAutoscaler 的狀態
HTTP 請求
GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status
引數
name (在路徑中): string,必填
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): string,必填
pretty (在查詢中): string
響應
200 (HorizontalPodAutoscaler): 成功
401: 未授權
list
列出或監視 HorizontalPodAutoscaler 型別的物件
HTTP 請求
GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
引數
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 (HorizontalPodAutoscalerList): 成功
401: 未授權
list
列出或監視 HorizontalPodAutoscaler 型別的物件
HTTP 請求
GET /apis/autoscaling/v1/horizontalpodautoscalers
引數
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (HorizontalPodAutoscalerList): 成功
401: 未授權
create
建立一個 HorizontalPodAutoscaler
HTTP 請求
POST /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
引數
namespace (在路徑中): string,必填
body: HorizontalPodAutoscaler,必填
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (HorizontalPodAutoscaler): 成功
201 (HorizontalPodAutoscaler): 已建立
202 (HorizontalPodAutoscaler): 已接受
401: 未授權
update
替換指定的 HorizontalPodAutoscaler
HTTP 請求
PUT /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
引數
name (在路徑中): string,必填
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): string,必填
body: HorizontalPodAutoscaler,必填
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (HorizontalPodAutoscaler): 成功
201 (HorizontalPodAutoscaler): 已建立
401: 未授權
update
替換指定的 HorizontalPodAutoscaler 的狀態
HTTP 請求
PUT /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status
引數
name (在路徑中): string,必填
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): string,必填
body: HorizontalPodAutoscaler,必填
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (HorizontalPodAutoscaler): 成功
201 (HorizontalPodAutoscaler): 已建立
401: 未授權
patch
部分更新指定的 HorizontalPodAutoscaler
HTTP 請求
PATCH /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
引數
name (在路徑中): string,必填
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): string,必填
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (HorizontalPodAutoscaler): 成功
201 (HorizontalPodAutoscaler): 已建立
401: 未授權
patch
部分更新指定的 HorizontalPodAutoscaler 的狀態
HTTP 請求
PATCH /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status
引數
name (在路徑中): string,必填
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): string,必填
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (HorizontalPodAutoscaler): 成功
201 (HorizontalPodAutoscaler): 已建立
401: 未授權
delete
刪除一個 HorizontalPodAutoscaler
HTTP 請求
DELETE /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
引數
name (在路徑中): string,必填
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): string,必填
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
pretty (在查詢中): string
propagationPolicy (在查詢中): string
響應
200 (Status): OK
202 (Status): 已接受
401: 未授權
deletecollection
刪除 HorizontalPodAutoscaler 集合
HTTP 請求
DELETE /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
引數
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 專案的其他地方進行。