apiVersion: autoscaling/v1
import "k8s.io/api/autoscaling/v1"
水平 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 是有关自动扩缩器的当前信息。
水平 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.ac.cn/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 的百分比);如果未指定,将使用默认的自动扩缩策略。
水平 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。为时间包提供的许多工厂方法提供包装器。
observedGeneration (int64)
observedGeneration 是此自动扩缩器观察到的最新生成版本。
水平 Pod 自动扩缩器对象列表。
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscalerList
metadata (ListMeta)
标准列表元数据。
items ([]HorizontalPodAutoscaler),必需
items 是水平 Pod 自动扩缩器对象的列表。
get 读取指定的 HorizontalPodAutoscalerGET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
name (在路径中): string, 必需
HorizontalPodAutoscaler 的名称
namespace (在路径中): string, 必需
pretty (在查询中): string
200 (HorizontalPodAutoscaler):确定
401: 未授权
get 读取指定 HorizontalPodAutoscaler 的状态GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status
name (在路径中): string, 必需
HorizontalPodAutoscaler 的名称
namespace (在路径中): string, 必需
pretty (在查询中): string
200 (HorizontalPodAutoscaler):确定
401: 未授权
list 列出或监视 HorizontalPodAutoscaler 类型的对象GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
namespace (在路径中): string, 必需
allowWatchBookmarks (in query): boolean
continue (in query): string
fieldSelector (in query): string
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
200 (HorizontalPodAutoscalerList):确定
401: 未授权
list 列出或监视 HorizontalPodAutoscaler 类型的对象GET /apis/autoscaling/v1/horizontalpodautoscalers
allowWatchBookmarks (in query): boolean
continue (in query): string
fieldSelector (in query): string
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
200 (HorizontalPodAutoscalerList):确定
401: 未授权
create 创建一个 HorizontalPodAutoscalerPOST /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 替换指定的 HorizontalPodAutoscalerPUT /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 的状态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 部分更新指定的 HorizontalPodAutoscalerPATCH /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
name (在路径中): string, 必需
HorizontalPodAutoscaler 的名称
namespace (在路径中): string, 必需
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
200 (HorizontalPodAutoscaler):确定
201 (HorizontalPodAutoscaler):已创建
401: 未授权
patch 部分更新指定 HorizontalPodAutoscaler 的状态PATCH /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status
name (在路径中): string, 必需
HorizontalPodAutoscaler 的名称
namespace (在路径中): string, 必需
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
200 (HorizontalPodAutoscaler):确定
201 (HorizontalPodAutoscaler):已创建
401: 未授权
delete 删除一个 HorizontalPodAutoscalerDELETE /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
name (在路径中): string, 必需
HorizontalPodAutoscaler 的名称
namespace (在路径中): string, 必需
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (in query): integer
ignoreStoreReadErrorWithClusterBreakingPotential (in query): boolean
pretty (在查询中): string
propagationPolicy (in query): string
200 (Status): 确定
202 (Status): 已接受
401: 未授权
deletecollection 删除 HorizontalPodAutoscaler 集合DELETE /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers
namespace (在路径中): string, 必需
body: DeleteOptions
continue (in query): string
dryRun (在查询中): string
fieldSelector (in query): string
gracePeriodSeconds (in query): integer
ignoreStoreReadErrorWithClusterBreakingPotential (in query): boolean
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
propagationPolicy (in query): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
200 (Status): 确定
401: 未授权
本页面是自动生成的。
如果您打算报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。