Scale

此文档中的信息可能已过时

此文档的更新日期比原文晚,因此其中的信息可能已过时。如果能阅读英文,请查看英文版本以获取最新信息: Scale

Scale

Scale 表示针对资源的扩缩容请求。

apiVersion: autoscaling/v1

import "k8s.io/api/autoscaling/v1"

Scale

Scale 表示针对资源的扩缩容请求。


字段描述
apiVersion
string
apiVersion 定义了该对象表示形式的版本化模式(schema)。服务器应将已识别的模式转换为最新的内部值, 并可拒绝无法识别的值。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
kind
string
kind 是一个字符串值,用于标识该对象所代表的 REST 资源。服务器可以根据客户端提交请求的端点推断出该值。 该字段不可更新。采用驼峰命名法(CamelCase)。更多信息请参阅: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata
ObjectMeta
标准对象元数据;更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata。
spec
ScaleSpec
spec 定义了伸缩(scale)的行为。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status。
status
ScaleStatus
status 表示伸缩(scale)的当前状态。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status。

ScaleSpec

ScaleSpec 描述了伸缩(scale)子资源的属性。


字段描述
replicas
integer
replicas 表示伸缩(scale)的目标实例数。

ScaleStatus

ScaleStatus 表示伸缩(scale)子资源的当前状态。


字段描述
replicas *
integer
replicas 表示伸缩(scale)的当前实例数。
selector
string
selector 是针对 Pod 的标签查询,用于匹配副本数量。它与标签选择器(label selector)相同, 但采用字符串格式,以避免客户端进行内省(introspection)。该字符串的格式与查询参数(query-param)语法一致。 关于标签选择器的更多信息,请参阅: https://k8s-docs.ru/zh-cn/docs/concepts/overview/working-with-objects/labels/
最后修改 August 09, 2026 at 6:09 PM PST: [zh-cn]sync scale-v1-autoscaling (6469f5a94e)