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.dev.org.tw/docs/concepts/overview/working-with-objects/names/#names
scaleTargetRef.apiVersion (string)
apiVersion 是參考物件的 API 版本
minReplicas (int32)
minReplicas 是自動擴充器可以縮減的副本數目下限。 預設值為 1 個 Pod。 如果啟用 alpha 功能閘道 HPAScaleToZero,且至少設定一個物件或外部指標,則允許 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 (時間)
lastScaleTime 是水平 Pod 自動擴展器上次擴展 Pod 數量的時間;autoscaler 使用此時間來控制變更 Pod 數量的頻率。
Time 是 time.Time 的包裝器,支援正確地封送至 YAML 和 JSON。包裝器是為 time 套件提供的許多工廠方法而提供的。
observedGeneration (int64)
observedGeneration 是此自動擴展器觀察到的最新世代。
HorizontalPodAutoscalerList
水平 pod 自動擴展器物件的清單。
apiVersion: autoscaling/v1
種類: HorizontalPodAutoscalerList
metadata (ListMeta)
標準清單 metadata。
items ([]HorizontalPodAutoscaler), 必要
items 是水平 pod 自動擴展器物件的清單。
操作
get
讀取指定的 HorizontalPodAutoscaler
HTTP 請求
GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
參數
回應
200 (HorizontalPodAutoscaler): 成功
401: 未經授權
get
讀取指定 HorizontalPodAutoscaler 的狀態
HTTP 請求
GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status
參數
回應
200 (HorizontalPodAutoscaler): 成功
401: 未經授權
list
列出或監看 HorizontalPodAutoscaler 種類的物件
HTTP 請求
GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
參數
namespace (在路徑中): 字串, 必要
allowWatchBookmarks (在查詢中): 布林值
continue (在查詢中): 字串
fieldSelector (在查詢中): 字串
labelSelector (在查詢中): 字串
limit (在查詢中): 整數
pretty (在查詢中): 字串
resourceVersion (在查詢中): 字串
resourceVersionMatch (在查詢中): 字串
sendInitialEvents (在查詢中): 布林值
timeoutSeconds (在查詢中): 整數
watch (在查詢中): 布林值
回應
200 (HorizontalPodAutoscalerList): 成功
401: 未經授權
list
列出或監看 HorizontalPodAutoscaler 種類的物件
HTTP 請求
GET /apis/autoscaling/v1/horizontalpodautoscalers
參數
allowWatchBookmarks (在查詢中): 布林值
continue (在查詢中): 字串
fieldSelector (在查詢中): 字串
labelSelector (在查詢中): 字串
limit (在查詢中): 整數
pretty (在查詢中): 字串
resourceVersion (在查詢中): 字串
resourceVersionMatch (在查詢中): 字串
sendInitialEvents (在查詢中): 布林值
timeoutSeconds (在查詢中): 整數
watch (在查詢中): 布林值
回應
200 (HorizontalPodAutoscalerList): 成功
401: 未經授權
create
建立 HorizontalPodAutoscaler
HTTP 請求
POST /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
參數
namespace (在路徑中): 字串, 必要
body: HorizontalPodAutoscaler, 必要
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
pretty (在查詢中): 字串
回應
200 (HorizontalPodAutoscaler): 成功
201 (HorizontalPodAutoscaler): 已建立
202 (HorizontalPodAutoscaler): 已接受
401: 未經授權
update
取代指定的 HorizontalPodAutoscaler
HTTP 請求
PUT /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
參數
name (在路徑中): 字串, 必要
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): 字串, 必要
body: HorizontalPodAutoscaler, 必要
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
pretty (在查詢中): 字串
回應
200 (HorizontalPodAutoscaler): 成功
201 (HorizontalPodAutoscaler): 已建立
401: 未經授權
update
取代指定 HorizontalPodAutoscaler 的狀態
HTTP 請求
PUT /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status
參數
name (在路徑中): 字串, 必要
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): 字串, 必要
body: HorizontalPodAutoscaler, 必要
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
pretty (在查詢中): 字串
回應
200 (HorizontalPodAutoscaler): 成功
201 (HorizontalPodAutoscaler): 已建立
401: 未經授權
patch
部分更新指定的 HorizontalPodAutoscaler
HTTP 請求
PATCH /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
參數
name (在路徑中): 字串, 必要
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): 字串, 必要
body: Patch, 必要
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
force (在查詢中): 布林值
pretty (在查詢中): 字串
回應
200 (HorizontalPodAutoscaler): 成功
201 (HorizontalPodAutoscaler): 已建立
401: 未經授權
patch
部分更新指定 HorizontalPodAutoscaler 的狀態
HTTP 請求
PATCH /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status
參數
name (在路徑中): 字串, 必要
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): 字串, 必要
body: Patch, 必要
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
force (在查詢中): 布林值
pretty (在查詢中): 字串
回應
200 (HorizontalPodAutoscaler): 成功
201 (HorizontalPodAutoscaler): 已建立
401: 未經授權
delete
刪除 HorizontalPodAutoscaler
HTTP 請求
DELETE /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
參數
name (在路徑中): 字串, 必要
HorizontalPodAutoscaler 的名稱
namespace (在路徑中): 字串, 必要
body: DeleteOptions
dryRun (在查詢中): 字串
gracePeriodSeconds (在查詢中): 整數
pretty (在查詢中): 字串
propagationPolicy (在查詢中): 字串
回應
200 (Status): 成功
202 (Status): 已接受
401: 未經授權
deletecollection
刪除 HorizontalPodAutoscaler 的集合
HTTP 請求
DELETE /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
參數
namespace (在路徑中): 字串, 必要
body: DeleteOptions
continue (在查詢中): 字串
dryRun (在查詢中): 字串
fieldSelector (在查詢中): 字串
gracePeriodSeconds (在查詢中): 整數
labelSelector (在查詢中): 字串
limit (在查詢中): 整數
pretty (在查詢中): 字串
propagationPolicy (在查詢中): 字串
resourceVersion (在查詢中): 字串
resourceVersionMatch (在查詢中): 字串
sendInitialEvents (在查詢中): 布林值
timeoutSeconds (在查詢中): 整數
回應
200 (Status): 成功
401: 未經授權
此頁面為自動產生。
如果您計劃回報此頁面的問題,請在您的問題描述中提及此頁面為自動產生。此修正可能需要在 Kubernetes 專案中的其他地方進行。