From 4f10aa1bc6cdd04fd4681a6693493d104c779843 Mon Sep 17 00:00:00 2001 From: zhangxiaoyang Date: Mon, 11 Jul 2022 14:11:59 +0800 Subject: [PATCH 01/14] [zh-cn] Add custom-resource-definition-v1.md chinese version --- .../custom-resource-definition-v1.md | 1736 +++++++++++++++++ 1 file changed, 1736 insertions(+) create mode 100644 content/zh-cn/docs/reference/kubernetes-api/extend-resources/custom-resource-definition-v1.md diff --git a/content/zh-cn/docs/reference/kubernetes-api/extend-resources/custom-resource-definition-v1.md b/content/zh-cn/docs/reference/kubernetes-api/extend-resources/custom-resource-definition-v1.md new file mode 100644 index 0000000000..f0bba86822 --- /dev/null +++ b/content/zh-cn/docs/reference/kubernetes-api/extend-resources/custom-resource-definition-v1.md @@ -0,0 +1,1736 @@ +--- +api_metadata: + apiVersion: "apiextensions.k8s.io/v1" + import: "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + kind: "CustomResourceDefinition" +content_type: "api_reference" +description: "CustomResourceDefinition 表示应在 API 服务器上公开的资源。" +title: "CustomResourceDefinition" +weight: 1 +--- + + +`apiVersion: apiextensions.k8s.io/v1` + +`import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"` + +## CustomResourceDefinition {#CustomResourceDefinition} + + +CustomResourceDefinition 表示应在 API 服务器上公开的资源。其名称必须采用 `<.spec.name>.<.spec.group>` 格式。 + +
+ +- **apiVersion**: apiextensions.k8s.io/v1 + +- **kind**: CustomResourceDefinition + +- **metadata** (}}">ObjectMeta) + + 标准的对象元数据,更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +- **spec** (}}">CustomResourceDefinitionSpec), 必需 + + spec 描述了用户希望资源的呈现方式 + +- **status** (}}">CustomResourceDefinitionStatus) + + status 表示 CustomResourceDefinition 的实际状态 + +## CustomResourceDefinitionSpec {#CustomResourceDefinitionSpec} + + +CustomResourceDefinitionSpec 描述了用户希望资源的呈现方式 + +
+ + +- **group** (string),必需 + + group 是自定义资源的 API 组。自定义资源在 `/apis//...` 下提供。 + 必须与 CustomResourceDefinition 的名称匹配(格式为 `.`)。 + + + +- **names** (CustomResourceDefinitionNames),必需 + + names 表示自定义资源的资源和种类名称。 + + + + **CustomResourceDefinitionNames 表示提供此 CustomResourceDefinition 资源的名称** + + - **names.kind** (string),必需 + + kind 是资源的序列化类型。它通常是驼峰命名的单数形式。自定义资源实例将使用此值作为 API 调用中的 `kind` 属性。 + + + + - **names.plural** (string),必需 + + plural 是所提供的资源的复数名称,自定义资源在 `/apis///.../` 下提供。 + 必须与 CustomResourceDefinition 的名称匹配(格式为 `.`)。必须全部小写。 + + - **names.categories** ([]string) + + + + categories 是自定义资源所属的分组资源列表(例如 'all')。 + 它在 API 发现文档中发布,并支持客户端像 `kubectl get all` 这样的调用。 + + - **names.listKind** (string) + + + + listKind 是此资源列表的序列化类型。默认为 "`kind`List"。 + + - **names.shortNames** ([]string) + + + + shortNames 是资源的短名称,在 API 发现文档中公开,并支持客户端调用,如 `kubectl get `。必须全部小写。 + + - **names.singular** (string) + + + + singular 是资源的单数名称。必须全部小写。默认为小写 `kind`。 + + + +- **scope** (string),必需 + + scope 表示自定义资源是群集作用域还是命名空间作用域。允许的值为 `Cluster` 和 `Namespaced`。 + + + +- **versions** ([]CustomResourceDefinitionVersion),必需 + + versions 是自定义资源的所有 API 版本的列表。版本名称用于计算服务版本在 API 发现中列出的顺序。 + 如果版本字符串是与 Kubernetes 的版本号形式类似,则它将排序在非 Kubernetes 形式版本字符串之前。 + Kubernetes 的版本号字符串按字典顺序排列。Kubernetes 版本号以 “v” 字符开头, + 后面是一个数字(主版本),然后是可选字符串 “alpha” 或 “beta” 和另一个数字(次要版本)。 + 它们首先按 GA > beta > alpha 排序(其中 GA 是没有 beta 或 alpha 等后缀的版本),然后比较主要版本, + 最后是比较次要版本。版本排序列表示例:v10、v2、v1、v11beta2、v10beta3、v3beta1、v12alpha1、v11alpha2、foo1、foo10。 + + + + **CustomResourceDefinitionVersion 描述 CRD 的一个版本** + + - **versions.name** (string),必需 + + name 是版本名称,例如 “v1”、“v2beta1” 等。如果 `served` 是 true,自定义资源在 + `/apis///...` 版本下提供。 + + + + - **versions.served** (boolean),必需 + + served 是用于启用/禁用该版本通过 REST API 提供服务的标志 + + + + - **versions.storage** (boolean),必需 + + storage 表示在将自定义资源持久保存到存储时应使用此版本。有且仅有一个版本的 storage=true。 + + - **versions.additionalPrinterColumns** ([]CustomResourceColumnDefinition) + + + + additionalPrinterColumns 表示在表输出中返回的附加列。 + 有关详细信息,请参阅 https://kubernetes.io/zh-cn/docs/reference/using-api/api-concepts/#receiving-resources-as-tables。 + 如果没有指定列,则显示自定义资源存活时间(AGE)列。 + + + + + **CustomResourceColumnDefinition 指定用于服务器端打印的列。** + + - **versions.additionalPrinterColumns.jsonPath** (string),必需 + + jsonPath 是一个简单的 JSON 路径(使用数组表示法),它对每个自定义资源进行评估,以生成该列的值。 + + + + - **versions.additionalPrinterColumns.name** (string),必需 + + name 是便于阅读的列名称 + + + + - **versions.additionalPrinterColumns.type** (string),必需 + + type 是此列的 OpenAPI 类型定义。有关详细信息, + 请参阅 https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types + + - **versions.additionalPrinterColumns.description** (string) + + + + description 是该列的可读性描述 + + - **versions.additionalPrinterColumns.format** (string) + + + + format 是这个列的可选 OpenAPI 类型定义。'name' 格式应用于主标识符列,以帮助客户端识别列是资源名称。 + 有关详细信息,请参阅 https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types。 + + - **versions.additionalPrinterColumns.priority** (int32) + + + + priority 是一个定义此列相对于其他列的相对重要性的整数。数字越低,优先级越高。 + 在空间有限的情况下,可以省略的列的优先级应大于 0。 + + - **versions.deprecated** (boolean) + + + + deprecated 表示此版本的自定义资源 API 已弃用。设置为 true 时,对此版本的 API + 请求会在服务器响应头信息中带有警告(warning)信息。此值默认为 false。 + + - **versions.deprecationWarning** (string) + + + + deprecationWarning 会覆盖返回给 API 客户端的默认警告。只能在 `deprecated` 为 true 时设置。 + 默认警告表示此版本已弃用,建议使用最新的同等或更高稳定性版本(如果存在)。 + + - **versions.schema** (CustomResourceValidation) + + + + schema 描述了用于验证、精简和默认此版本的自定义资源的模式。 + + + + + **CustomResourceValidation 是 CustomResources 的验证方法列表。** + + - **versions.schema.openAPIV3Schema** (}}">JSONSchemaProps) + + + + openAPIV3Schema 是用于验证和精简的 OpenAPI v3 模式。 + + - **versions.subresources** (CustomResourceSubresources) + + + + subresources 指定此版本已定义的自定义资源具有哪些子资源。 + + + + + **CustomResourceSubresources 定义了 CustomResources 子资源的状态和规模。** + + - **versions.subresources.scale** (CustomResourceSubresourceScale) + + + + scale 表示自定义资源应该提供一个 `/scale` 子资源,该子资源返回一个 `autoscaling/v1` Scale 对象。 + + + + + **CustomResourceSubresourceScale 定义了如何为 CustomResources 的 scale 子资源提供服务。** + + - **versions.subresources.scale.specReplicasPath** (string),必需 + + specReplicasPath 定义对应于 Scale 的自定义资源内的 JSON 路径 `spec.replicas`。 + 只允许没有数组表示法的 JSON 路径。必须是 `.spec` 下的 JSON 路径。 + 如果自定义资源中的给定路径下没有值,那么 GET `/scale` 子资源将返回错误。 + + + + - **versions.subresources.scale.statusReplicasPath** (string),必需 + + statusReplicasPath 定义对应于 Scale 的自定义资源内的 JSON 路径 `status.replicas`。 + 只允许不带数组表示法的 JSON 路径。必须是 `.status` 下的 JSON 路径。 + 如果自定义资源中给定路径下没有值,则 `/scale` 子资源中的 `status.replicas` 值将默认为 0。 + + - **versions.subresources.scale.labelSelectorPath** (string) + + + + labelSelectorPath 定义对应于 Scale 的自定义资源内的 JSON 路径 `status.selector`。 + 只允许不带数组表示法的 JSON 路径。必须是 `.status` 或 `.spec` 下的路径。 + 必须设置为与 HorizontalPodAutoscaler 一起使用。 + 此 JSON 路径指向的字段必须是字符串字段(不是复杂的选择器结构),其中包含字符串形式的序列化标签选择器。 + 更多信息: https://kubernetes.io/zh-cn/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource。 + 如果自定义资源中给定路径下没有值,则 `/scale` 子资源中的 `status.selector` 默认值为空字符串。 + + - **versions.subresources.status** (CustomResourceSubresourceStatus) + + + + status 表示自定义资源应该为 `/status` 子资源服务。当启用时: + + 1. 对自定义资源主端点的请求会忽略对对象的 `status` 节的改变; + 2. 对自定义资源 `/status` 子资源的请求忽略对对象的 `status` 节以外的任何变化。 + + + + + CustomResourceSubresourceStatus 定义了如何为自定义资源提供 status 子资源。 + 状态由 CustomResource 中的 `.status` JSON 路径表示。设置后, + + * 为自定义资源提供一个 `/status` 子资源。 + * 向 `/status` 子资源发出的 PUT 请求时,需要提供自定义资源对象,服务器端会忽略对 status 节以外的任何内容更改。 + * 对自定义资源的 PUT/POST/PATCH 请求会忽略对 status 节的更改。 + +- **conversion** (CustomResourceConversion) + + + conversion 定义了 CRD 的转换设置。 + + + + + **CustomResourceConversion 描述了如何转换不同版本的自定义资源。** + + - **conversion.strategy** (string),必需 + + strategy 指定如何在版本之间转换自定义资源。允许的值为: + + - `None`:转换器仅更改 apiVersion 并且不会触及自定义资源中的任何其他字段。 + - `Webhook`:API 服务器将调用外部 Webhook 进行转换。此选项需要其他信息。这要求 + spec.preserveUnknownFields 为 false,并且设置 spec.conversion.webhook。 + + - **conversion.webhook** (WebhookConversion) + + + + webhook 描述了如何调用转换 Webhook。当 `strategy` 设置为 `Webhook` 时有效。 + + + + + **WebhookConversion 描述了如何调用转换 Webhook** + + - **conversion.webhook.conversionReviewVersions** ([]string),必需 + + conversionReviewVersions 是 Webhook 期望的 `ConversionReview` 版本的有序列表。 + API 服务器将使用它支持的列表中的第一个版本。如果 API 服务器不支持此列表中指定的版本,则自定义资源的转换将失败。 + 如果持久化的 Webhook 配置指定了允许的版本但其中不包括 API 服务器所了解的任何版本,则对 Webhook 的调用将失败。 + + - **conversion.webhook.clientConfig** (WebhookClientConfig) + + + + 如果 strategy 是 `Webhook`, 那么 clientConfig 是关于如何调用 Webhook 的说明。 + + + + + **WebhookClientConfig 包含与 Webhook 建立 TLS 连接的信息。** + + - **conversion.webhook.clientConfig.caBundle** ([]byte) + + + + caBundle 是一个 PEM 编码的 CA 包,用于验证 Webhook 服务器的服务证书。 + 如果未指定,则使用 API 服务器上的系统根证书。 + + - **conversion.webhook.clientConfig.service** (ServiceReference) + + + + service 是对此 Webhook 服务的引用。必须指定 service 或 url 字段之一。 + + 如果在集群中运行 Webhook,那么你应该使用 `service`。 + + + + + **ServiceReference 保存对 Service.legacy.k8s.io 的一个引用。** + + - **conversion.webhook.clientConfig.service.name** (string),必需 + + name 是服务的名称。必需。 + + + + - **conversion.webhook.clientConfig.service.namespace** (string),必需 + + namespace 是服务的命名空间。必需。 + + - **conversion.webhook.clientConfig.service.path** (string) + + + + path 是一个可选的 URL 路径,Webhook 将通过该路径联系服务。 + + - **conversion.webhook.clientConfig.service.port** (int32) + + + + port 是 Webhook 联系的可选服务端口。`port` 应该是一个有效的端口号(1-65535,包含)。 + 为实现向后兼容,默认端口号为 443。 + + - **conversion.webhook.clientConfig.url** (string) + + + + url 以标准 URL 的形式(`scheme://host:port/path`)给出 Webhook 的位置。`url` 或 `service` 必须指定一个且只能指定一个。 + + + + `host` 不应引用集群中运行的服务;若使用集群内服务应改为使用 `service` 字段。 + host 值可能会通过外部 DNS 解析(例如,`kube-apiserver` 无法解析集群内 DNS,因为这将违反分层规则)。 + `host` 也可能是 IP 地址。 + + + + 请注意,使用 `localhost` 或 `127.0.0.1` 作为 `host` 是有风险的, + 除非你非常小心地在所有运行 API 服务器的主机上运行这个 Webhook,因为这些 API 服务器可能需要调用这个 Webhook。 + 这样的安装可能是不可移植的,也就是说,不容易在一个新的集群中复现。 + + + + scheme 必须是 "https";URL 必须以 "https://" 开头。 + + 路径(path)是可选的,如果存在,则可以是 URL 中允许的任何字符串。 + 你可以使用路径传递一个任意字符串给 Webhook,例如,一个集群标识符。 + + 不允许使用用户或基本认证,例如 "user:password@",是不允许的。片段("#...")和查询参数("?...")也是不允许的。 + +- **preserveUnknownFields** (boolean) + + + + preserveUnknownFields 表示将对象写入持久性存储时应保留 OpenAPI 模式中未规定的对象字段。 + apiVersion、kind、元数据(metadata)和元数据中的已知字段始终保留。不推荐使用此字段,而建议在 + `spec.versions[*].schema.openAPIV3Schema` 中设置 `x-preserve-unknown-fields` 为 true。 + 更多详细信息参见: https://kubernetes.io/zh-cn/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields + +## JSONSchemaProps {#JSONSchemaProps} + + +JSONSchemaProps 是JSON 模式(JSON-Schema),遵循其规范草案第 4 版 (http://json-schema.org/)。 + +
+ +- **$ref** (string) + +- **$schema** (string) + +- **additionalItems** (JSONSchemaPropsOrBool) + + + + **JSONSchemaPropsOrBool 表示 JSONSchemaProps 或布尔值。布尔属性默认为 true。** + +- **additionalProperties** (JSONSchemaPropsOrBool) + + + + **JSONSchemaPropsOrBool 表示 JSONSchemaProps 或布尔值。布尔属性默认为 true。** + +- **allOf** ([]}}">JSONSchemaProps) + +- **anyOf** ([]}}">JSONSchemaProps) + +- **default** (JSON) + + + default 是未定义对象字段的默认值。设置默认值操作是 CustomResourceDefaulting 特性门控所控制的一个 Beta 特性。 + 应用默认值设置时要求 spec.preserveUnknownFields 为 false。 + + + + **JSON 表示任何有效的 JSON 值。支持以下类型:bool、int64、float64、string、[]interface{}、map[string]interface{} 和 nil。** + +- **definitions** (map[string]}}">JSONSchemaProps) + +- **dependencies** (map[string]JSONSchemaPropsOrStringArray) + + + + **JSONSchemaPropsOrStringArray 表示 JSONSchemaProps 或字符串数组。** + +- **description** (string) + +- **enum** ([]JSON) + + + + **JSON 表示任何有效的 JSON 值。支持以下类型:bool、int64、float64、string、[]interface{}、map[string]interface{} 和 nil。** + +- **example** (JSON) + + + + **JSON 表示任何有效的 JSON 值。支持以下类型:bool、int64、float64、string、[]interface{}、map[string]interface{} 和 nil。** + +- **exclusiveMaximum** (boolean) + +- **exclusiveMinimum** (boolean) + +- **externalDocs** (ExternalDocumentation) + + + + **ExternalDocumentation 允许引用外部资源作为扩展文档。** + + - **externalDocs.description** (string) + + - **externalDocs.url** (string) + +- **format** (string) + + + format 是 OpenAPI v3 格式字符串。未知格式将被忽略。以下格式会被验证合法性: + + - bsonobjectid:一个 bson 对象的 ID,即一个 24 个字符的十六进制字符串 + - uri:由 Go 语言 net/url.ParseRequestURI 解析得到的 URI + - email:由 Go 语言 net/mail.ParseAddress 解析得到的电子邮件地址 + - hostname:互联网主机名的有效表示,由 RFC 1034 第 3.1 节 [RFC1034] 定义 + - ipv4:由 Go 语言 net.ParseIP 解析得到的 IPv4 协议的 IP + - ipv6:由 Go 语言 net.ParseIP 解析得到的 IPv6 协议的 IP + - cidr: 由 Go 语言 net.ParseCIDR 解析得到的 CIDR + - mac:由 Go 语言 net.ParseMAC 解析得到的一个 MAC 地址 + - uuid:UUID,允许大写字母,满足正则表达式 (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ + - uuid3:UUID3,允许大写字母,满足正则表达式 (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ + - uuid4:UUID4,允许大写字母,满足正则表达式 (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ + - uuid5:UUID5,允许大写字母,满足正则表达式 (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ + - isbn:一个 ISBN10 或 ISBN13 数字字符串,如 "0321751043" 或 "978-0321751041" + - isbn10:一个 ISBN10 数字字符串,如 "0321751043" + - isbn13: 一个 ISBN13 号码字符串,如 "978-0321751041" + - creditcard:信用卡号码,满足正则表达式 ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$,其中混合任意非数字字符 + - ssn:美国社会安全号码,满足正则表达式 ^\d{3}[- ]?\d{2}[- ]?\d{4}$ + - hexcolor:一个十六进制的颜色编码,如 "#FFFFFF",满足正则表达式 ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ + - rgbcolor:一个 RGB 颜色编码 例如 "rgb(255,255,255)" + - byte:base64 编码的二进制数据 + - password: 任何类型的字符串 + - date:类似 "2006-01-02" 的日期字符串,由 RFC3339 中的完整日期定义 + - duration:由 Go 语言 time.ParseDuration 解析的持续时长字符串,如 "22 ns",或与 Scala 持续时间格式兼容。 + - datetime:一个日期时间字符串,如 "2014-12-15T19:30:20.000Z",由 RFC3339 中的 date-time 定义。 + +- **id** (string) + +- **items** (JSONSchemaPropsOrArray) + + + + **JSONSchemaPropsOrArray 表示可以是 JSONSchemaProps 或 JSONSchemaProps 数组的值。这里目的主要用于序列化。** + +- **maxItems** (int64) + +- **maxLength** (int64) + +- **maxProperties** (int64) + +- **maximum** (double) + +- **minItems** (int64) + +- **minLength** (int64) + +- **minProperties** (int64) + +- **minimum** (double) + +- **multipleOf** (double) + +- **not** (}}">JSONSchemaProps) + +- **nullable** (boolean) + +- **oneOf** ([]}}">JSONSchemaProps) + +- **pattern** (string) + +- **patternProperties** (map[string]}}">JSONSchemaProps) + +- **properties** (map[string]}}">JSONSchemaProps) + +- **required** ([]string) + +- **title** (string) + +- **type** (string) + +- **uniqueItems** (boolean) + +- **x-kubernetes-embedded-resource** (boolean) + + + x-kubernetes-embedded-resource 定义该值是一个嵌入式 Kubernetes runtime.Object,具有 TypeMeta 和 ObjectMeta。 + 类型必须是对象。允许进一步限制嵌入对象。会自动验证 kind、apiVersion 和 metadata 等字段值。 + x-kubernetes-preserve-unknown-fields 允许为 true,但如果对象已完全指定 + (除 kind、apiVersion、metadata 之外),则不必为 true。 + +- **x-kubernetes-int-or-string** (boolean) + + + x-kubernetes-int-or-string 指定此值是整数或字符串。如果为 true,则允许使用空类型, + 并且如果遵循以下模式之一,则允许作为 anyOf 的子类型: + + 1) anyOf: + - type: integer + - type: string + 2) allOf: + - anyOf: + - type: integer + - type: string + + + - (可以有选择地包含其他类型) + +- **x-kubernetes-list-map-keys** ([]string) + + + X-kubernetes-list-map-keys 通过指定用作 map 索引的键来使用 x-kubernetes-list-type `map` 注解数组。 + + 这个标签必须只用于 "x-kubernetes-list-type" 扩展设置为 "map" 的列表。 + 而且,为这个属性指定的值必须是子结构的标量类型的字段(不支持嵌套)。 + + 指定的属性必须是必需的或具有默认值,以确保所有列表项都存在这些属性。 + +- **x-kubernetes-list-type** (string) + + + x-kubernetes-list-type 注解一个数组以进一步描述其拓扑。此扩展名只能用于列表,并且可能有 3 个可能的值: + + + + 1. `atomic`: + 列表被视为单个实体,就像标量一样。原子列表在更新时将被完全替换。这个扩展可以用于任何类型的列表(结构,标量,…)。 + 2. `set`: + set 是不能有多个具有相同值的列表。每个值必须是标量、具有 x-kubernetes-map-type + `atomic` 的对象或具有 x-kubernetes-list-type `atomic` 的数组。 + 3. `map`: + 这些列表类似于映射表,因为它们的元素具有用于标识它们的非索引键。合并时保留顺序。 + map 标记只能用于元数类型为 object 的列表。 + 数组默认为原子数组。 + +- **x-kubernetes-map-type** (string) + + + x-kubernetes-map-type 注解一个对象以进一步描述其拓扑。此扩展只能在 type 为 object 时使用,并且可能有 2 个可能的值: + + + + 1) `granular`: + 这些 map 是真实的映射(键值对),每个字段都是相互独立的(它们都可以由不同的角色来操作)。 + 这是所有 map 的默认行为。 + 2) `atomic`:map 被视为单个实体,就像标量一样。原子 map 更新后将被完全替换。 + +- **x-kubernetes-preserve-unknown-fields** (boolean) + + + + x-kubernetes-preserve-unknown-fields 针对未在验证模式中指定的字段,禁止 API 服务器的解码步骤剪除这些字段。 + 这一设置对字段的影响是递归的,但在模式中指定了嵌套 properties 或 additionalProperties 时,会切换回正常的字段剪除行为。 + 该值可为 true 或 undefined,不能为 false。 + +- **x-kubernetes-validations** ([]ValidationRule) + + + + **补丁策略:基于键 `rule` 合并** + + **Map:合并时将保留 rule 键的唯一值** + + x-kubernetes-validations 描述了用 CEL 表达式语言编写的验证规则列表。此字段是 Alpha 级别。 + 使用此字段需要启用 `CustomResourceValidationExpressions` 特性门控。 + + + + + **ValidationRule 描述用 CEL 表达式语言编写的验证规则。** + + - **x-kubernetes-validations.rule** (string),必需 + + + + rule 表示将由 CEL 评估的表达式。参考: https://github.com/google/cel-spec。 + rule 的作用域为模式中的 x-kubernetes-validation 扩展所在的位置。CEL 表达式中的 `self` 与作用域值绑定。 + 例子:rule 的作用域是一个具有状态子资源的资源根:{"rule": "self.status.actual \<= self.spec.maxDesired"}。 + + + + 如果 rule 的作用域是一个带有属性的对象,那么该对象的可访问属性是通过 `self` 进行字段选择的, + 并且可以通过 `has(self.field)` 来检查字段是否存在。在 CEL 表达式中,Null 字段被视为不存在的字段。 + 如果该 rule 的作用域是一个带有附加属性的对象(例如一个 map),那么该 map 的值可以通过 + `self[mapKey]`来访问,map 是否包含某主键可以通过 `mapKey in self` 来检查。 + map 中的所有条目都可以通过 CEL 宏和函数(如 `self.all(...)`)访问。 + 如果 rule 的作用域是一个数组,数组的元素可以通过 `self[i]` 访问,也可以通过宏和函数访问。 + 如果 rule 的作用域为标量,`self` 绑定到标量值。举例: + + - rule 作用域为对象映射:{"rule": "self.components['Widget'].priority \< 10"} + - rule 作用域为整数列表:{"rule": "self.values.all(value, value >= 0 && value \< 100)"} + - rule 作用域为字符串值:{"rule": "self.startsWith('kube')"} + + + + `apiVersion`, `kind`, `metadata.name` 和 `metadata.generateName` 总是可以从对象的根和任何带 + x-kubernetes-embedded-resource 注解的对象访问。其他元数据属性都无法访问。 + + + + 在 CEL 表达式中无法访问通过 x-kubernetes-preserve-unknown-fields 保存在自定义资源中的未知数据。 + 这包括: + + - 由包含 x-kubernetes-preserve-unknown-fields 的对象模式所保留的未知字段值; + - 属性模式为 "未知类型" 的对象属性。"未知类型" 递归定义为: + + - 没有设置 type 但 x-kubernetes-preserve-unknown-fields 设置为 true 的模式。 + - 条目模式为"未知类型"的数组。 + - additionalProperties 模式为"未知类型"的对象。 + + + + 只有名称符合正则表达式 `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` 的属性才可被访问。 + 在表达式中访问属性时,可访问的属性名称根据以下规则进行转义: + + - '__' 转义为 '__underscores__' + - '.' 转义为 '__dot__' + - '-' 转义为 '__dash__' + - '/' 转义为 '__slash__' + - 恰好匹配 CEL 保留关键字的属性名称转义为 '__{keyword}__' 。这里的关键字具体包括: + "true","false","null","in","as","break","const","continue","else","for","function","if", + "import","let","loop","package","namespace","return"。 + 举例: + + - 规则访问名为 "namespace" 的属性:`{"rule": "self.__namespace__ > 0"}` + - 规则访问名为 "x-prop" 的属性:`{"rule": "self.x__dash__prop > 0"}` + - 规则访问名为 "redact__d" 的属性:`{"rule": "self.redact__underscores__d > 0"}` + + + + 对 x-kubernetes-list-type 为 'set' 或 'map' 的数组进行比较时忽略元素顺序,如:[1, 2] == [2, 1]。 + 使用 x-kubernetes-list-type 对数组进行串接使用下列类型的语义: + + - 'set':`X + Y` 执行合并,其中 `X` 保留所有元素的数组位置,并附加不相交的元素 `Y`,保留其局部顺序。 + - 'map':`X + Y` 执行合并,保留 `X` 中所有键的数组位置,但当 `X` 和 `Y` 的键集相交时,会被 `Y` 中的值覆盖。 + 添加 `Y` 中具有不相交键的元素,保持其局顺序。 + + - **x-kubernetes-validations.message** (string) + + + + message 表示验证失败时显示的消息。如果规则包含换行符,则需要该消息。消息不能包含换行符。 + 如果未设置,则消息为 "failed rule: {Rule}",如:"must be a URL with the host matching spec.host" + +## CustomResourceDefinitionStatus {#CustomResourceDefinitionStatus} + +CustomResourceDefinitionStatus 表示 CustomResourceDefinition 的状态 + +
+ +- **acceptedNames** (CustomResourceDefinitionNames) + + + + acceptedNames 是实际用于服务发现的名称。它们可能与规约(spec)中的名称不同。 + + + + + **CustomResourceDefinitionNames 表示提供此 CustomResourceDefinition 资源的名称** + + - **acceptedNames.kind** (string),必需 + + kind 是资源的序列化类型。它通常是驼峰命名的单数形式。自定义资源实例将使用此值作为 API 调用中的 `kind` 属性。 + + + + - **acceptedNames.plural** (string), required + + plural 是所提供的资源的复数名称,自定义资源在 `/apis///.../` 下提供。 + 必须与 CustomResourceDefinition 的名称匹配(格式为 `.`)。必须全部小写。 + + - **acceptedNames.categories** ([]string) + + + + categories 是此自定义资源所属的分组资源列表(例如 'all')。 + 它在 API 发现文档中发布,并被客户端用于支持像 `kubectl get all` 这样的调用。 + + - **acceptedNames.listKind** (string) + + + + listKind 是此资源列表的序列化类型。默认为 "`List`"。 + + - **acceptedNames.shortNames** ([]string) + + + + shortNames 是资源的短名称,在 API 发现文档中公开,并支持客户端调用,如 `kubectl get `。必须全部小写。 + + - **acceptedNames.singular** (string) + + + + singular 是资源的单数名称。必须全部小写。默认为小写形式的 `kind`。 + +- **conditions** ([]CustomResourceDefinitionCondition) + + + + **Map:合并时将保留 type 键的唯一值** + + conditions 表示 CustomResourceDefinition 特定方面的状态 + + + + + **CustomResourceDefinitionCondition 包含此 Pod 当前状况的详细信息。** + + - **conditions.status** (string),必需 + + status 表示状况(Condition)的状态,取值为 True、False 或 Unknown 之一。 + + + + - **conditions.type** (string),必需 + + type 是状况的类型。类型包括:Established、NamesAccepted 和 Terminating。 + + - **conditions.lastTransitionTime** (Time) + + + + lastTransitionTime 是上一次发生状况状态转换的时间。 + + + + + **Time 是对 time.Time 的封装。Time 支持对 YAML 和 JSON 进行正确封包。为 time 包的许多函数方法提供了封装器。** + + - **conditions.message** (string) + + + + message 是有关上次转换的详细可读信息。 + + - **conditions.reason** (string) + + + + reason 表述状况上次转换原因的、驼峰格式命名的、唯一的一个词。 + +- **storedVersions** ([]string) + + + + storedVersions 列出了曾经被持久化的所有 CustomResources 版本。跟踪这些版本可以为 etcd 中的存储版本提供迁移路径。 + 该字段是可变的,因此迁移控制器可以完成到另一个版本的迁移(确保存储中没有遗留旧对象),然后从该列表中删除其余版本。 + 当版本在此列表中时,则不能从 `spec.versions` 中删除。 + +## CustomResourceDefinitionList {#CustomResourceDefinitionList} + +CustomResourceDefinitionList 是 CustomResourceDefinition 对象的列表。 + +
+ + + +- **items** ([]}}">CustomResourceDefinition),必需 + + items 列出单个 CustomResourceDefinition 对象 + +- **apiVersion** (string) + + + + apiVersion 定义对象表示的版本化模式。服务器应将已识别的模式转换为最新的内部值,并可能拒绝未识别的值。 + 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + +- **kind** (string) + + + + kind 是一个字符串值,表示该对象所表示的 REST 资源。服务器可以从客户端提交请求的端点推断出 REST 资源。不能被更新。驼峰命名。 + 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + +- **metadata** (}}">ListMeta) + + + + 标准的对象元数据,更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +## Operations {#Operations} + +
+ + +### `get` 读取指定的 CustomResourceDefinition + +#### HTTP 请求 + +GET /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} + + +#### 参数 + +- **name** (**路径参数**):string,必需 + + CustomResourceDefinition 的名称 + +- **pretty** (**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">CustomResourceDefinition): OK + +401: Unauthorized + + +### `get` 读取指定 CustomResourceDefinition 的状态 + +#### HTTP 请求 + +GET /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status + + +#### 参数 + +- **name** (**路径参数**):string,必需 + + CustomResourceDefinition 的名称 + +- **pretty** (**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">CustomResourceDefinition): OK + +401: Unauthorized + + +### `list` 列出或观察 CustomResourceDefinition 类型的对象 + +#### HTTP 请求 + +GET /apis/apiextensions.k8s.io/v1/customresourcedefinitions + + +#### 参数 + +- **allowWatchBookmarks** (**查询参数**):boolean + + }}">allowWatchBookmarks + +- **continue** (**查询参数**):string + + }}">continue + +- **fieldSelector** (**查询参数**):string + + }}">fieldSelector + +- **labelSelector** (**查询参数**):string + + }}">labelSelector + +- **limit** (**查询参数**):integer + + }}">limit + +- **pretty** (**查询参数**):string + + }}">pretty + +- **resourceVersion** (**查询参数**):string + + }}">resourceVersion + +- **resourceVersionMatch** (**查询参数**):string + + }}">resourceVersionMatch + +- **timeoutSeconds** (**查询参数**):integer + + }}">timeoutSeconds + +- **watch** (**查询参数**):boolean + + }}">watch + + +#### 响应 + +200 (}}">CustomResourceDefinitionList): OK + +401: Unauthorized + + +### `create` 创建一个 CustomResourceDefinition + +#### HTTP 请求 + +POST /apis/apiextensions.k8s.io/v1/customresourcedefinitions + + +#### 参数 + +- **body**: }}">CustomResourceDefinition,必需 + +- **dryRun** (**查询参数**):string + + }}">dryRun + +- **fieldManager** (**查询参数**):string + + }}">fieldManager + +- **fieldValidation** (**查询参数**):string + + }}">fieldValidation + +- **pretty** (**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">CustomResourceDefinition): OK + +201 (}}">CustomResourceDefinition): Created + +202 (}}">CustomResourceDefinition): Accepted + +401: Unauthorized + + +### `update` 替换指定的 CustomResourceDefinition + +#### HTTP 请求 + +PUT /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} + + +#### 参数 + +- **name** (**路径参数**):string,必需 + + CustomResourceDefinition 的名称 + +- **body**: }}">CustomResourceDefinition,必需 + +- **dryRun** (**查询参数**):string + + }}">dryRun + +- **fieldManager** (**查询参数**):string + + }}">fieldManager + +- **fieldValidation** (**查询参数**):string + + }}">fieldValidation + +- **pretty** (**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">CustomResourceDefinition): OK + +201 (}}">CustomResourceDefinition): Created + +401: Unauthorized + + +### `update` 替换指定 CustomResourceDefinition 的状态 + +#### HTTP 请求 + +PUT /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status + + +#### 参数 + +- **name** (**路径参数**):string,必需 + + CustomResourceDefinition 的名称 + +- **body**: }}">CustomResourceDefinition,必需 + +- **dryRun** (**查询参数**):string + + }}">dryRun + +- **fieldManager** (**查询参数**):string + + }}">fieldManager + +- **fieldValidation** (**查询参数**):string + + }}">fieldValidation + +- **pretty** (**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">CustomResourceDefinition): OK + +201 (}}">CustomResourceDefinition): Created + +401: Unauthorized + + +### `patch` 部分更新指定的 CustomResourceDefinition + +#### HTTP 请求 + +PATCH /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} + + +#### 参数 + +- **name** (**路径参数**):string,必需 + + CustomResourceDefinition 的名称 + +- **body**: }}">Patch,必需 + +- **dryRun** (**查询参数**):string + + }}">dryRun + +- **fieldManager** (**查询参数**):string + + }}">fieldManager + +- **fieldValidation** (**查询参数**):string + + }}">fieldValidation + +- **force** (**查询参数**):boolean + + }}">force + +- **pretty**(**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">CustomResourceDefinition): OK + +201 (}}">CustomResourceDefinition): Created + +401: Unauthorized + + +### `patch` 部分更新指定 CustomResourceDefinition 的状态 + +#### HTTP 请求 + +PATCH /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status + + +#### 参数 + +- **name** (**路径参数**):string,必需 + + CustomResourceDefinition 的名称 + +- **body**: }}">Patch,必需 + +- **dryRun** (**查询参数**):string + + }}">dryRun + +- **fieldManager** (**查询参数**):string + + }}">fieldManager + +- **fieldValidation** (**查询参数**):string + + }}">fieldValidation + +- **force** (**查询参数**):boolean + + }}">force + +- **pretty** (**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">CustomResourceDefinition): OK + +201 (}}">CustomResourceDefinition): Created + +401: Unauthorized + + +### `delete` 删除一个 CustomResourceDefinition + +#### HTTP 请求 + +DELETE /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} + + +#### 参数 + +- **name** (**路径参数**):string,必需 + + CustomResourceDefinition 的名称 + +- **body**: }}">DeleteOptions + +- **dryRun** (**查询参数**):string + + }}">dryRun + +- **gracePeriodSeconds** (**查询参数**):integer + + }}">gracePeriodSeconds + +- **pretty** (**查询参数**):string + + }}">pretty + +- **propagationPolicy** (**查询参数**):string + + }}">propagationPolicy + + +#### 响应 + +200 (}}">Status): OK + +202 (}}">Status): Accepted + +401: Unauthorized + + +### `deletecollection` 删除 CustomResourceDefinition 的集合 + +#### HTTP 请求 + +DELETE /apis/apiextensions.k8s.io/v1/customresourcedefinitions + + +#### 参数 + +- **body**: }}">DeleteOptions + +- **continue** (**查询参数**):string + + }}">continue + +- **dryRun** (**查询参数**):string + + }}">dryRun + +- **fieldSelector** (**查询参数**):string + + }}">fieldSelector + +- **gracePeriodSeconds** (**查询参数**):integer + + }}">gracePeriodSeconds + +- **labelSelector** (**查询参数**):string + + }}">labelSelector + +- **limit** (**查询参数**):integer + + }}">limit + +- **pretty** (**查询参数**):string + + }}">pretty + +- **propagationPolicy** (**查询参数**):string + + }}">propagationPolicy + +- **resourceVersion** (**查询参数**):string + + }}">resourceVersion + +- **resourceVersionMatch** (**查询参数**):string + + }}">resourceVersionMatch + +- **timeoutSeconds** (**查询参数**):integer + + }}">timeoutSeconds + + +#### 响应 + +200 (}}">Status): OK + +401: Unauthorized + From b9376184989ea9214a02c6c7d6dd2f5d82418ca9 Mon Sep 17 00:00:00 2001 From: Arhell Date: Sat, 16 Jul 2022 08:39:08 +0300 Subject: [PATCH 02/14] [de] update links in addons.md --- content/de/docs/concepts/cluster-administration/addons.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/de/docs/concepts/cluster-administration/addons.md b/content/de/docs/concepts/cluster-administration/addons.md index 60a54b9ef1..77f098198b 100644 --- a/content/de/docs/concepts/cluster-administration/addons.md +++ b/content/de/docs/concepts/cluster-administration/addons.md @@ -21,15 +21,15 @@ Die Add-Ons in den einzelnen Kategorien sind alphabetisch sortiert - Die Reihenf * [ACI](https://www.github.com/noironetworks/aci-containers) bietet Container-Networking und Network-Security mit Cisco ACI. * [Calico](https://docs.projectcalico.org/latest/introduction/) ist ein Networking- und Network-Policy-Provider. Calico unterstützt eine Reihe von Networking-Optionen, damit Du die richtige für deinen Use-Case wählen kannst. Dies beinhaltet Non-Overlaying and Overlaying-Networks mit oder ohne BGP. Calico nutzt die gleiche Engine um Network-Policies für Hosts, Pods und (falls Du Istio & Envoy benutzt) Anwendungen auf Service-Mesh-Ebene durchzusetzen. -* [Canal](https://github.com/tigera/canal/tree/master/k8s-install) vereint Flannel und Calico um Networking- und Network-Policies bereitzustellen. +* [Canal](https://projectcalico.docs.tigera.io/getting-started/kubernetes/flannel/flannel) vereint Flannel und Calico um Networking- und Network-Policies bereitzustellen. * [Cilium](https://github.com/cilium/cilium) ist ein L3 Network- and Network-Policy-Plugin welches das transparent HTTP/API/L7-Policies durchsetzen kann. Sowohl Routing- als auch Overlay/Encapsulation-Modes werden uterstützt. Außerdem kann Cilium auf andere CNI-Plugins aufsetzen. -* [CNI-Genie](https://github.com/Huawei-PaaS/CNI-Genie) ermöglicht das nahtlose Verbinden von Kubernetes mit einer Reihe an CNI-Plugins wie z.B. Calico, Canal, Flannel, Romana, oder Weave. +* [CNI-Genie](https://github.com/cni-genie/CNI-Genie) ermöglicht das nahtlose Verbinden von Kubernetes mit einer Reihe an CNI-Plugins wie z.B. Calico, Canal, Flannel, Romana, oder Weave. * [Contiv](https://contivpp.io/) bietet konfigurierbares Networking (Native L3 auf BGP, Overlay mit vxlan, Klassisches L2, Cisco-SDN/ACI) für verschiedene Anwendungszwecke und auch umfangreiches Policy-Framework. Das Contiv-Projekt ist vollständig [Open Source](http://github.com/contiv). Der [installer](http://github.com/contiv/install) bietet sowohl kubeadm als auch nicht-kubeadm basierte Installationen. * [Contrail](http://www.juniper.net/us/en/products-services/sdn/contrail/contrail-networking/), basierend auf [Tungsten Fabric](https://tungsten.io), ist eine Open Source, multi-Cloud Netzwerkvirtualisierungs- und Policy-Management Plattform. Contrail und Tungsten Fabric sind mit Orechstratoren wie z.B. Kubernetes, OpenShift, OpenStack und Mesos integriert und bieten Isolationsmodi für Virtuelle Maschinen, Container (bzw. Pods) und Bare Metal workloads. * [Flannel](https://github.com/flannel-io/flannel#deploying-flannel-manually) ist ein Overlay-Network-Provider der mit Kubernetes genutzt werden kann. * [Knitter](https://github.com/ZTE/Knitter/) ist eine Network-Lösung die Mehrfach-Network in Kubernetes ermöglicht. -* Multus ist ein Multi-Plugin für Mehrfachnetzwerk-Unterstützung um alle CNI-Plugins (z.B. Calico, Cilium, Contiv, Flannel), zusätzlich zu SRIOV-, DPDK-, OVS-DPDK- und VPP-Basierten Workloads in Kubernetes zu unterstützen. -* [NSX-T](https://docs.vmware.com/en/VMware-NSX-T/2.0/nsxt_20_ncp_kubernetes.pdf) Container Plug-in (NCP) bietet eine Integration zwischen VMware NSX-T und einem Orchestator wie z.B. Kubernetes. Außerdem bietet es eine Integration zwischen NSX-T und Containerbasierten CaaS/PaaS-Plattformen wie z.B. Pivotal Container Service (PKS) und OpenShift. +* [Multus](https://github.com/k8snetworkplumbingwg/multus-cni) ist ein Multi-Plugin für Mehrfachnetzwerk-Unterstützung um alle CNI-Plugins (z.B. Calico, Cilium, Contiv, Flannel), zusätzlich zu SRIOV-, DPDK-, OVS-DPDK- und VPP-Basierten Workloads in Kubernetes zu unterstützen. +* [NSX-T](https://docs.vmware.com/en/VMware-NSX-T-Data-Center/index.html) Container Plug-in (NCP) bietet eine Integration zwischen VMware NSX-T und einem Orchestator wie z.B. Kubernetes. Außerdem bietet es eine Integration zwischen NSX-T und Containerbasierten CaaS/PaaS-Plattformen wie z.B. Pivotal Container Service (PKS) und OpenShift. * [Nuage](https://github.com/nuagenetworks/nuage-kubernetes/blob/v5.1.1-1/docs/kubernetes-1-installation.rst) ist eine SDN-Plattform die Policy-Basiertes Networking zwischen Kubernetes Pods und nicht-Kubernetes Umgebungen inklusive Sichtbarkeit und Security-Monitoring bereitstellt. * [Romana](https://github.com/romana/romana) ist eine Layer 3 Network-Lösung für Pod-Netzwerke welche auch die [NetworkPolicy API](/docs/concepts/services-networking/network-policies/) unterstützt. Details zur Installation als kubeadm Add-On sind [hier](https://github.com/romana/romana/tree/master/containerize) verfügbar. * [Weave Net](https://www.weave.works/docs/net/latest/kube-addon/) bietet Networking and Network-Policies und arbeitet auf beiden Seiten der Network-Partition ohne auf eine externe Datenbank angwiesen zu sein. From c599dc66374a2db19a3c117ae764efc61d26da38 Mon Sep 17 00:00:00 2001 From: windsonsea Date: Sat, 16 Jul 2022 12:50:20 +0800 Subject: [PATCH 03/14] updated /workload-resources/controller-revision-v1.md --- .../controller-revision-v1.md | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/content/zh-cn/docs/reference/kubernetes-api/workload-resources/controller-revision-v1.md b/content/zh-cn/docs/reference/kubernetes-api/workload-resources/controller-revision-v1.md index d29eda09df..69b44a1b7a 100644 --- a/content/zh-cn/docs/reference/kubernetes-api/workload-resources/controller-revision-v1.md +++ b/content/zh-cn/docs/reference/kubernetes-api/workload-resources/controller-revision-v1.md @@ -7,7 +7,6 @@ content_type: "api_reference" description: "ControllerRevision 实现了状态数据的不可变快照。" title: "ControllerRevision" weight: 7 -auto_generated: false --- - `apiVersion: apps/v1` `import "k8s.io/api/apps/v1"` @@ -71,8 +69,8 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。 --> - **metadata** (}}">ObjectMeta) - 标准的对象元数据。 - 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + 标准的对象元数据。更多信息: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *RawExtension 用于以外部版本来保存扩展数据。 + **RawExtension 用于以外部版本来保存扩展数据。** - // 内部包: + 内部包: + + ```go type MyAPIObject struct { runtime.TypeMeta `json:",inline"` MyPlugin runtime.Object `json:"myPlugin"` @@ -120,6 +120,7 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。 type PluginA struct { AOption string `json:"aOption"` } + ``` - // 外部包: + 外部包: + + ```go type MyAPIObject struct { runtime.TypeMeta `json:",inline"` MyPlugin runtime.RawExtension `json:"myPlugin"` @@ -137,6 +140,7 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。 type PluginA struct { AOption string `json:"aOption"` } + ``` - // 在网络上,JSON 看起来像这样: + 在网络上,JSON 看起来像这样: + ```json { "kind":"MyAPIObject", "apiVersion":"v1", @@ -157,6 +162,7 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。 "aOption":"foo", }, } + ``` - **metadata** (}}">ListMeta) - 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + 更多信息: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata | 月度补丁发布 | Cherry Pick 截止日期 | 目标日期 | | ------------- | -------------------- | ----------- | -| 2022 年 7 月 | 2022-07-08 | 2022-07-13 | | 2022 年 8 月 | 2022-08-12 | 2022-08-16 | | 2022 年 9 月 | 2022-09-09 | 2022-09-14 | | 2022 年 10 月 | 2022-10-07 | 2022-10-12 | @@ -164,12 +162,13 @@ releases may also occur in between these. ### 1.24 -Next patch release is **1.24.1** +Next patch release is **1.24.4** -End of Life for **1.24** is **2023-09-29** +End of Life for **1.24** is **2023-07-28** | PATCH RELEASE | CHERRY PICK DEADLINE | TARGET DATE | NOTE | |---------------|----------------------|-------------|------| +| 1.24.4 | 2022-08-12 | 2022-08-17 | | | 1.24.3 | 2022-07-08 | 2022-07-13 | | | 1.24.2 | 2022-06-10 | 2022-06-15 | | | 1.24.1 | 2022-05-20 | 2022-05-24 | | @@ -178,12 +177,13 @@ End of Life for **1.24** is **2023-09-29** ### 1.24 -下一个补丁版本是 **1.24.1** +下一个补丁版本是 **1.24.4** -**1.24** 的生命周期结束时间为 **2023-09-29** +**1.24** 的生命周期结束时间为 **2023-07-28** | 补丁发布 | Cherry Pick 截止日期 | 目标日期 | 说明 | |----------|----------------------|------------|------| +| 1.24.4 | 2022-08-12 | 2022-08-17 | | | 1.24.3 | 2022-07-08 | 2022-07-13 | | | 1.24.2 | 2022-06-10 | 2022-06-15 | | | 1.24.1 | 2022-05-20 | 2022-05-24 | | @@ -191,10 +191,15 @@ End of Life for **1.24** is **2023-09-29** ### 1.23 + +下一个补丁版本是 **1.23.10**。 + **1.23** 于 **2022-12-28** 进入维护模式。 **1.23** 的生命周期结束时间为 **2023-02-28**。 @@ -203,9 +208,23 @@ End of Life for **1.23** is **2023-02-28**. | Patch Release | Cherry Pick Deadline | Target Date | Note | [Out-of-Band Release](https://groups.google.com/a/kubernetes.io/g/dev/c/Xl1sm-CItaY) +| Patch Release | Cherry Pick Deadline | Target Date | Note | +|---------------|----------------------|-------------|------| +| 1.23.10 | 2022-08-12 | 2022-08-17 | | +| 1.23.9 | 2022-07-08 | 2022-07-13 | | +| 1.23.8 | 2022-06-10 | 2022-06-15 | | +| 1.23.7 | 2022-05-20 | 2022-05-24 | | +| 1.23.6 | 2022-04-08 | 2022-04-13 | | +| 1.23.5 | 2022-03-11 | 2022-03-16 | | +| 1.23.4 | 2022-02-11 | 2022-02-16 | | +| 1.23.3 | 2022-01-24 | 2022-01-25 | [Out-of-Band Release](https://groups.google.com/a/kubernetes.io/g/dev/c/Xl1sm-CItaY) | +| 1.23.2 | 2022-01-14 | 2022-01-19 | | +| 1.23.1 | 2021-12-14 | 2021-12-16 | | --> + | 补丁发布 | Cherry Pick 截止日期 | 目标日期 | 说明 | |---------------|----------------------|-------------|------| +| 1.23.10 | 2022-08-12 | 2022-08-17 | | | 1.23.9 | 2022-07-08 | 2022-07-13 | | | 1.23.8 | 2022-06-10 | 2022-06-15 | | | 1.23.7 | 2022-05-20 | 2022-05-24 | | @@ -219,19 +238,39 @@ End of Life for **1.23** is **2023-02-28**. ### 1.22 + +下一个补丁版本是 **1.22.13**。 + **1.22** 于 **2022-08-28** 进入维护模式 **1.22** 的生命周期结束时间为 **2022-10-28** | 补丁发布 | Cherry Pick 截止日期 | 目标日期 | 说明 | |---------------|----------------------|-------------|------| +| 1.22.13 | 2022-08-12 | 2022-08-17 | | | 1.22.12 | 2022-07-08 | 2022-07-13 | | | 1.22.11 | 2022-06-10 | 2022-06-15 | | | 1.22.10 | 2022-05-20 | 2022-05-24 | | From 438d534b9df67b9b486da1a98310767e9cb0b410 Mon Sep 17 00:00:00 2001 From: Guangwen Feng Date: Sat, 16 Jul 2022 15:56:36 +0800 Subject: [PATCH 05/14] Fix incorrect format in open-a-pr.md Signed-off-by: Guangwen Feng --- content/en/docs/contribute/new-content/open-a-pr.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/en/docs/contribute/new-content/open-a-pr.md b/content/en/docs/contribute/new-content/open-a-pr.md index a9c9a1e16a..ddd1f2bb73 100644 --- a/content/en/docs/contribute/new-content/open-a-pr.md +++ b/content/en/docs/contribute/new-content/open-a-pr.md @@ -484,10 +484,10 @@ conflict. You must resolve all merge conflicts in your PR. 1. Fetch changes from `kubernetes/website`'s `upstream/main` and rebase your branch: - ```shell - git fetch upstream - git rebase upstream/main - ``` + ```shell + git fetch upstream + git rebase upstream/main + ``` 1. Inspect the results of the rebase: @@ -512,7 +512,7 @@ conflict. You must resolve all merge conflicts in your PR. 1. Continue the rebase: - `` + ```shell git rebase --continue ``` From 0d252a9e14f156fd094c3894881f54f34fb1a5f7 Mon Sep 17 00:00:00 2001 From: windsonsea Date: Sat, 16 Jul 2022 17:17:55 +0800 Subject: [PATCH 06/14] [zh-cn] fix some 404 issues --- content/zh-cn/docs/concepts/architecture/nodes.md | 5 ++--- .../docs/concepts/cluster-administration/networking.md | 4 ++-- .../docs/concepts/overview/working-with-objects/names.md | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/content/zh-cn/docs/concepts/architecture/nodes.md b/content/zh-cn/docs/concepts/architecture/nodes.md index a57f98dc14..b50ded1681 100644 --- a/content/zh-cn/docs/concepts/architecture/nodes.md +++ b/content/zh-cn/docs/concepts/architecture/nodes.md @@ -1170,14 +1170,13 @@ see [KEP-2400](https://github.com/kubernetes/enhancements/issues/2400) and its * 进一步了解节点[组件](/zh-cn/docs/concepts/overview/components/#node-components)。 * 阅读 [Node 的 API 定义](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#node-v1-core)。 * 阅读架构设计文档中有关 - [Node](https://git.k8s.io/community/contributors/design-proposals/architecture/architecture.md#the-kubernetes-node) + [Node](https://git.k8s.io/design-proposals-archive/architecture/architecture.md#the-kubernetes-node) 的章节。 * 了解[污点和容忍度](/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration/)。 - diff --git a/content/zh-cn/docs/concepts/cluster-administration/networking.md b/content/zh-cn/docs/concepts/cluster-administration/networking.md index edc6866ec8..9c8fcae681 100644 --- a/content/zh-cn/docs/concepts/cluster-administration/networking.md +++ b/content/zh-cn/docs/concepts/cluster-administration/networking.md @@ -474,7 +474,7 @@ Weave Net 可以作为 [CNI 插件](https://www.weave.works/docs/net/latest/cni- 网络模型的早期设计、运行原理以及未来的一些计划, -都在[联网设计文档](https://git.k8s.io/community/contributors/design-proposals/network/networking.md)里有更详细的描述。 +都在[联网设计文档](https://git.k8s.io/design-proposals-archive/network/networking.md)里有更详细的描述。 diff --git a/content/zh-cn/docs/concepts/overview/working-with-objects/names.md b/content/zh-cn/docs/concepts/overview/working-with-objects/names.md index 91eb354810..85710cda6a 100644 --- a/content/zh-cn/docs/concepts/overview/working-with-objects/names.md +++ b/content/zh-cn/docs/concepts/overview/working-with-objects/names.md @@ -13,9 +13,9 @@ Every Kubernetes object also has a [_UID_](#uids) that is unique across your who For example, you can only have one Pod named `myapp-1234` within the same [namespace](/docs/concepts/overview/working-with-objects/namespaces/), but you can have one Pod and one Deployment that are each named `myapp-1234`. --> -集群中的每一个对象都有一个[_名称_](#names)来标识在同类资源中的唯一性。 +集群中的每一个对象都有一个[**名称**](#names)来标识在同类资源中的唯一性。 -每个 Kubernetes 对象也有一个 [_UID_](#uids) 来标识在整个集群中的唯一性。 +每个 Kubernetes 对象也有一个 [**UID**](#uids) 来标识在整个集群中的唯一性。 比如,在同一个[名字空间](/zh-cn/docs/concepts/overview/working-with-objects/namespaces/) 中有一个名为 `myapp-1234` 的 Pod,但是可以命名一个 Pod 和一个 Deployment 同为 `myapp-1234`。 @@ -171,9 +171,9 @@ UUIDs 是标准化的,见 ISO/IEC 9834-8 和 ITU-T X.667。 * 进一步了解 Kubernetes [标签](/zh-cn/docs/concepts/overview/working-with-objects/labels/) -* 参阅 [Kubernetes 标识符和名称](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md)的设计文档 +* 参阅 [Kubernetes 标识符和名称](https://git.k8s.io/design-proposals-archive/architecture/identifiers.md)的设计文档 From c1138ddee22c9aaa974a7dded48803250c073ca9 Mon Sep 17 00:00:00 2001 From: "yanrong.shi" Date: Sat, 16 Jul 2022 01:10:42 +0800 Subject: [PATCH 07/14] Update volumes.md --- content/zh-cn/docs/concepts/storage/volumes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/zh-cn/docs/concepts/storage/volumes.md b/content/zh-cn/docs/concepts/storage/volumes.md index ebe50dd897..5466f54f33 100644 --- a/content/zh-cn/docs/concepts/storage/volumes.md +++ b/content/zh-cn/docs/concepts/storage/volumes.md @@ -540,11 +540,11 @@ It mounts a directory and writes the requested data in plain text files. 这种卷类型挂载一个目录并在纯文本文件中写入所请求的数据。 {{< note >}} -容器以 [subPath](#using-subpath) 卷挂载方式使用 downwardAPI 时,将不能接收到它的更新。 +容器以 [subPath](#using-subpath) 卷挂载方式使用 downward API 时,在字段值更改时将不能接收到它的更新。 {{< /note >}} +`get`、`list` 和 `watch` 动作都可以返回一个资源的完整详细信息。就返回的数据而言,它们是等价的。 +例如,对 `secrets` 使用 `list` 仍然会显示所有已返回资源的 `data` 属性。 +{{< /caution >}} + 你可以约束一个 {{< glossary_tooltip text="Pod" term_id="pod" >}} @@ -172,6 +172,19 @@ define. Some of the benefits of affinity and anti-affinity include: * 你可以使用节点上(或其他拓扑域中)运行的其他 Pod 的标签来实施调度约束, 而不是只能使用节点本身的标签。这个能力让你能够定义规则允许哪些 Pod 可以被放置在一起。 + +亲和性功能由两种类型的亲和性组成: + +* **节点亲和性**功能类似于 `nodeSelector` 字段,但它的表达能力更强,并且允许你指定软规则。 +* Pod 间亲和性/反亲和性允许你根据其他 Pod 的标签来约束 Pod。 + 在这一示例中,所应用的规则如下: -* 节点必须包含键名为 `kubernetes.io/os` 的标签,并且其取值为 `linux`。 -* 节点 **最好** 具有键名为 `another-node-label-key` 且取值为 +* 节点**必须**包含一个键名为 `topology.kubernetes.io/zone` 的标签, + 并且该标签的取值**必须**为 `antarctica-east1` 或 `antarctica-west1`。 +* 节点**最好**具有一个键名为 `another-node-label-key` 且取值为 `another-node-label-value` 的标签。 如果你指定了多个与同一 `nodeSelectorTerms` 关联的 `matchExpressions`, 则只有当所有 `matchExpressions` 都满足时 Pod 才可以被调度到节点上。 @@ -341,8 +355,8 @@ must have existing nodes with the `kubernetes.io/os=linux` label. 在配置多个[调度方案](/zh-cn/docs/reference/scheduling/config/#multiple-profiles)时, @@ -410,7 +424,7 @@ Inter-pod affinity and anti-affinity allow you to constrain which nodes your Pods can be scheduled on based on the labels of **Pods** already running on that node, instead of the node labels. --> -### pod 间亲和性与反亲和性 {#inter-pod-affinity-and-anti-affinity} +### Pod 间亲和性与反亲和性 {#inter-pod-affinity-and-anti-affinity} Pod 间亲和性与反亲和性使你可以基于已经在节点上运行的 **Pod** 的标签来约束 Pod 可以调度到的节点,而不是基于节点上的标签。 @@ -552,9 +566,9 @@ same zone currently running Pods with the `Security=S2` Pod label. -查阅[设计文档](https://github.com/kubernetes/design-proposals-archive/blob/main/scheduling/podaffinity.md) +查阅[设计文档](https://git.k8s.io/design-proposals-archive/scheduling/podaffinity.md) 以进一步熟悉 Pod 亲和性与反亲和性的示例。 +以一个三节点的集群为例,该集群运行一个带有 Redis 这种内存缓存的 Web 应用程序。 +你可以使用节点间的亲和性和反亲和性来尽可能地将 Web 服务器与缓存并置。 + * 进一步阅读[污点与容忍度](/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration/)文档。 -* 阅读[节点亲和性](https://git.k8s.io/community/contributors/design-proposals/scheduling/nodeaffinity.md) - 和[Pod 间亲和性与反亲和性](https://git.k8s.io/community/contributors/design-proposals/scheduling/podaffinity.md) +* 阅读[节点亲和性](https://git.k8s.io/design-proposals-archive/scheduling/nodeaffinity.md) + 和[Pod 间亲和性与反亲和性](https://git.k8s.io/design-proposals-archive/scheduling/podaffinity.md) 的设计文档。 * 了解[拓扑管理器](/zh-cn/docs/tasks/administer-cluster/topology-manager/)如何参与节点层面资源分配决定。 * 了解如何使用 [nodeSelector](/zh-cn/docs/tasks/configure-pod-container/assign-pods-nodes/)。 From 6ff1cde711d4d259f7869aba6c709383435affdb Mon Sep 17 00:00:00 2001 From: windsonsea Date: Sat, 16 Jul 2022 17:58:42 +0800 Subject: [PATCH 10/14] [zh-cn] resync /concepts/policy/resource-quotas.md --- .../docs/concepts/policy/resource-quotas.md | 75 +++++++++---------- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/content/zh-cn/docs/concepts/policy/resource-quotas.md b/content/zh-cn/docs/concepts/policy/resource-quotas.md index 75498e16b8..0611863d33 100644 --- a/content/zh-cn/docs/concepts/policy/resource-quotas.md +++ b/content/zh-cn/docs/concepts/policy/resource-quotas.md @@ -52,14 +52,15 @@ Resource quotas work like this: the `LimitRanger` admission controller to force defaults for pods that make no compute resource requirements. See the [walkthrough](/docs/tasks/administer-cluster/quota-memory-cpu-namespace/) for an example of how to avoid this problem. --> -- 不同的团队可以在不同的命名空间下工作。这可以通过 [RBAC](/zh-cn/docs/reference/access-authn-authz/rbac/) 强制执行。 +- 不同的团队可以在不同的命名空间下工作。这可以通过 + [RBAC](/zh-cn/docs/reference/access-authn-authz/rbac/) 强制执行。 - 集群管理员可以为每个命名空间创建一个或多个 ResourceQuota 对象。 -- 当用户在命名空间下创建资源(如 Pod、Service 等)时,Kubernetes 的配额系统会 - 跟踪集群的资源使用情况,以确保使用的资源用量不超过 ResourceQuota 中定义的硬性资源限额。 +- 当用户在命名空间下创建资源(如 Pod、Service 等)时,Kubernetes 的配额系统会跟踪集群的资源使用情况, + 以确保使用的资源用量不超过 ResourceQuota 中定义的硬性资源限额。 - 如果资源创建或者更新请求违反了配额约束,那么该请求会报错(HTTP 403 FORBIDDEN), 并在消息中给出有可能违反的约束。 -- 如果命名空间下的计算资源 (如 `cpu` 和 `memory`)的配额被启用,则用户必须为 - 这些资源设定请求值(request)和约束值(limit),否则配额系统将拒绝 Pod 的创建。 +- 如果命名空间下的计算资源 (如 `cpu` 和 `memory`)的配额被启用, + 则用户必须为这些资源设定请求值(request)和约束值(limit),否则配额系统将拒绝 Pod 的创建。 提示: 可使用 `LimitRanger` 准入控制器来为没有设置计算资源需求的 Pod 设置默认值。 若想避免这类问题,请参考 @@ -161,7 +162,7 @@ The following resource types are supported: ### Resource Quota For Extended Resources In addition to the resources mentioned above, in release 1.10, quota support for -[extended resources](/docs/concepts/configuration/manage-compute-resources-container/#extended-resources) is added. +[extended resources](/docs/concepts/configuration/manage-resources-containers/#extended-resources) is added. --> ### 扩展资源的资源配额 @@ -316,12 +317,9 @@ Job 而导致集群拒绝服务。 对有限的一组资源上实施一般性的对象数量配额也是可能的。 -此外,还可以进一步按资源的类型设置其配额。 支持以下类型: @@ -466,10 +464,10 @@ one value. For example: ``` -如果 `operator` 为 `Exists` 或 `DoesNotExist`,则*不*可以设置 `values` 字段。 +如果 `operator` 为 `Exists` 或 `DoesNotExist`,则**不**可以设置 `values` 字段。 -如果配额对象通过 `scopeSelector` 字段设置其作用域为优先级类,则配额对象只能 -跟踪以下资源: +如果配额对象通过 `scopeSelector` 字段设置其作用域为优先级类, +则配额对象只能跟踪以下资源: * `pods` * `cpu` @@ -713,27 +711,27 @@ Operators can use `CrossNamespacePodAffinity` quota scope to limit which namespa have pods with affinity terms that cross namespaces. Specifically, it controls which pods are allowed to set `namespaces` or `namespaceSelector` fields in pod affinity terms. --> -集群运维人员可以使用 `CrossNamespacePodAffinity` 配额作用域来 -限制哪个名字空间中可以存在包含跨名字空间亲和性规则的 Pod。 -更为具体一点,此作用域用来配置哪些 Pod 可以在其 Pod 亲和性规则 -中设置 `namespaces` 或 `namespaceSelector` 字段。 +集群运维人员可以使用 `CrossNamespacePodAffinity` +配额作用域来限制哪个名字空间中可以存在包含跨名字空间亲和性规则的 Pod。 +更为具体一点,此作用域用来配置哪些 Pod 可以在其 Pod 亲和性规则中设置 +`namespaces` 或 `namespaceSelector` 字段。 -禁止用户使用跨名字空间的亲和性规则可能是一种被需要的能力,因为带有 -反亲和性约束的 Pod 可能会阻止所有其他名字空间的 Pod 被调度到某失效域中。 +禁止用户使用跨名字空间的亲和性规则可能是一种被需要的能力, +因为带有反亲和性约束的 Pod 可能会阻止所有其他名字空间的 Pod 被调度到某失效域中。 -使用此作用域操作符可以避免某些名字空间(例如下面例子中的 `foo-ns`)运行 -特别的 Pod,这类 Pod 使用跨名字空间的 Pod 亲和性约束,在该名字空间中创建 -了作用域为 `CrossNamespaceAffinity` 的、硬性约束为 0 的资源配额对象。 +使用此作用域操作符可以避免某些名字空间(例如下面例子中的 `foo-ns`)运行特别的 Pod, +这类 Pod 使用跨名字空间的 Pod 亲和性约束,在该名字空间中创建了作用域为 +`CrossNamespaceAffinity` 的、硬性约束为 0 的资源配额对象。 ```yaml apiVersion: v1 @@ -752,12 +750,12 @@ spec: -如果集群运维人员希望默认禁止使用 `namespaces` 和 `namespaceSelector`,而 -仅仅允许在特定名字空间中这样做,他们可以将 `CrossNamespaceAffinity` 作为一个 -被约束的资源。方法是为 `kube-apiserver` 设置标志 +如果集群运维人员希望默认禁止使用 `namespaces` 和 `namespaceSelector`, +而仅仅允许在特定名字空间中这样做,他们可以将 `CrossNamespaceAffinity` +作为一个被约束的资源。方法是为 `kube-apiserver` 设置标志 `--admission-control-config-file`,使之指向如下的配置文件: ```yaml @@ -779,8 +777,8 @@ With the above configuration, pods can use `namespaces` and `namespaceSelector` if the namespace where they are created have a resource quota object with `CrossNamespaceAffinity` scope and a hard limit greater than or equal to the number of pods using those fields. --> -基于上面的配置,只有名字空间中包含作用域为 `CrossNamespaceAffinity` 且 -硬性约束大于或等于使用 `namespaces` 和 `namespaceSelector` 字段的 Pods +基于上面的配置,只有名字空间中包含作用域为 `CrossNamespaceAffinity` +且硬性约束大于或等于使用 `namespaces` 和 `namespaceSelector` 字段的 Pod 个数时,才可以在该名字空间中继续创建在其 Pod 亲和性规则中设置 `namespaces` 或 `namespaceSelector` 的新 Pod。 @@ -987,18 +985,18 @@ should be allowed in a namespace, if and only if, a matching quota object exists (例如 "cluster-services")的 Pod。 -通过这种机制,操作人员能够将限制某些高优先级类仅出现在有限数量的命名空间中, +通过这种机制,操作人员能够限制某些高优先级类仅出现在有限数量的命名空间中, 而并非每个命名空间默认情况下都能够使用这些优先级类。 -要实现此目的,应设置 kube-apiserver 的标志 `--admission-control-config-file` +要实现此目的,应设置 `kube-apiserver` 的标志 `--admission-control-config-file` 指向如下配置文件: ```yaml @@ -1057,14 +1055,13 @@ and it is to be created in a namespace other than `kube-system`. ## {{% heading "whatsnext" %}} -- 查看[资源配额设计文档](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_resource_quota.md) -- 查看[如何使用资源配额的详细示例](/zh-cn/docs/tasks/administer-cluster/quota-api-object/)。 -- 阅读[优先级类配额支持的设计文档](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/scheduling/pod-priority-resourcequota.md)。 - 了解更多信息。 -- 参阅 [LimitedResources](https://github.com/kubernetes/kubernetes/pull/36765) +- 参阅[资源配额设计文档](https://git.k8s.io/design-proposals-archive/resource-management/admission_control_resource_quota.md)。 +- 参阅[如何使用资源配额的详细示例](/zh-cn/docs/tasks/administer-cluster/quota-api-object/)。 +- 参阅[优先级类配额支持的设计文档](https://git.k8s.io/design-proposals-archive/scheduling/pod-priority-resourcequota.md)了解更多信息。 +- 参阅 [LimitedResources](https://github.com/kubernetes/kubernetes/pull/36765)。 From 525a36e683732cc5b217bd2e20df6355abb0441a Mon Sep 17 00:00:00 2001 From: windsonsea Date: Sat, 16 Jul 2022 17:29:33 +0800 Subject: [PATCH 11/14] [zh-cn] resync /concepts/policy/limit-range.md --- .../zh-cn/docs/concepts/policy/limit-range.md | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/content/zh-cn/docs/concepts/policy/limit-range.md b/content/zh-cn/docs/concepts/policy/limit-range.md index da2560b6a0..3eb7f7eee6 100644 --- a/content/zh-cn/docs/concepts/policy/limit-range.md +++ b/content/zh-cn/docs/concepts/policy/limit-range.md @@ -28,7 +28,7 @@ A _LimitRange_ provides constraints that can: - Set default request/limit for compute resources in a namespace and automatically inject them to Containers at runtime. --> -一个 _LimitRange(限制范围)_ 对象提供的限制能够做到: +一个 **LimitRange(限制范围)** 对象提供的限制能够做到: - 在一个命名空间中实施对每个 Pod 或 Container 最小和最大的资源使用量的限制。 - 在一个命名空间中实施对每个 PersistentVolumeClaim 能申请的最小和最大的存储空间大小的限制。 @@ -40,13 +40,14 @@ A _LimitRange_ provides constraints that can: LimitRange support has been enabled by default since Kubernetes 1.10. -LimitRange support is enabled by default for many Kubernetes distributions. +A LimitRange is enforced in a particular namespace when there is a +LimitRange object in that namespace. --> ## 启用 LimitRange 对 LimitRange 的支持自 Kubernetes 1.10 版本默认启用。 -LimitRange 支持在很多 Kubernetes 发行版本中也是默认启用的。 +当某命名空间中有一个 LimitRange 对象时,将在该命名空间中实施 LimitRange 限制。 -参阅 [LimitRanger 设计文档](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_limit_range.md)获取更多信息。 +参阅 [LimitRanger 设计文档](https://git.k8s.io/design-proposals-archive/resource-management/admission_control_limit_range.md)获取更多信息。 -关于使用限值的例子,可参看 +关于使用限值的例子,可参阅: - [如何配置每个命名空间最小和最大的 CPU 约束](/zh-cn/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)。 - [如何配置每个命名空间最小和最大的内存约束](/zh-cn/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)。 From 1d4a3ec97ad8f719957cb07e6ba4d42127cace51 Mon Sep 17 00:00:00 2001 From: windsonsea Date: Sat, 16 Jul 2022 15:44:20 +0800 Subject: [PATCH 12/14] [zh-cn] updated two blogs --- .../2022-05-03-kubernetes-release-1.24.md | 173 ++++++++---------- .../_posts/2022-06-01-annual-report-2021.md | 2 +- 2 files changed, 73 insertions(+), 102 deletions(-) diff --git a/content/zh-cn/blog/_posts/2022-05-03-kubernetes-release-1.24.md b/content/zh-cn/blog/_posts/2022-05-03-kubernetes-release-1.24.md index ecc3efe74a..887c5b9f8e 100644 --- a/content/zh-cn/blog/_posts/2022-05-03-kubernetes-release-1.24.md +++ b/content/zh-cn/blog/_posts/2022-05-03-kubernetes-release-1.24.md @@ -6,16 +6,14 @@ slug: kubernetes-1-24-release-announcement --- - -**作者**: [Kubernetes 1.24 发布团队](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.24/release-team.md) +**作者**: [Kubernetes 1.24 发布团队](https://git.k8s.io/sig-release/releases/release-1.24/release-team.md) 我们很高兴地宣布 Kubernetes 1.24 的发布,这是 2022 年的第一个版本! 这个版本包括 46 个增强功能:14 个增强功能已经升级到稳定版,15 个增强功能正在进入 Beta 版, -13 个增强功能正在进入 Alpha 阶段。另外,有两个功能被废弃了,还有两个功能被删除了。 +13 个增强功能正在进入 Alpha 阶段。另外,有两个功能被废弃了,还有两个功能被删除了。 - ## 主要议题 ### 从 kubelet 中删除 Dockershim 在 v1.20 版本中被废弃后,dockershim 组件已被从 Kubernetes v1.24 版本的 kubelet 中移除。 从v1.24开始,如果你依赖 Docker Engine 作为容器运行时, -则需要使用其他[受支持的运行时](/docs/setup/production-environment/container-runtimes/)之一 +则需要使用其他[受支持的运行时](/zh-cn/docs/setup/production-environment/container-runtimes/)之一 (如 containerd 或 CRI-O)或使用 CRI dockerd。 有关确保群集已准备好进行此删除的更多信息,请参阅[本指南](/zh-cn/blog/2022/03/31/ready-for-dockershim-removal/)。 @@ -59,7 +55,6 @@ see [this guide](/blog/2022/03/31/ready-for-dockershim-removal/). [New beta APIs will not be enabled in clusters by default](https://github.com/kubernetes/enhancements/issues/3136). Existing beta APIs and new versions of existing beta APIs will continue to be enabled by default. --> - ### 默认情况下关闭 Beta API [新的 beta API 默认不会在集群中启用](https://github.com/kubernetes/enhancements/issues/3136)。 @@ -73,7 +68,6 @@ signatures, and there is experimental support for [verifying image signatures](/docs/tasks/administer-cluster/verify-signed-images/). Signing and verification of release artifacts is part of [increasing software supply chain security for the Kubernetes release process](https://github.com/kubernetes/enhancements/issues/3027). --> - ### 签署发布工件 发布工件使用 [cosign](https://github.com/sigstore/cosign) 签名进行[签名](https://github.com/kubernetes/enhancements/issues/3031), @@ -86,10 +80,9 @@ Signing and verification of release artifacts is part of [increasing software su Kubernetes 1.24 offers beta support for publishing its APIs in the [OpenAPI v3 format](https://github.com/kubernetes/enhancements/issues/2896). --> - ### OpenAPI v3 -Kubernetes 1.24 提供了以 [OpenAPI v3 格式](https://github.com/kubernetes/enhancements/issues/2896)发布其 API 的 beta 支持。 +Kubernetes 1.24 提供了以 [OpenAPI v3 格式](https://github.com/kubernetes/enhancements/issues/2896)发布其 API 的 Beta 支持。 - ### 存储容量和卷扩展普遍可用 [存储容量跟踪](https://github.com/kubernetes/enhancements/issues/1472)支持通过 @@ -116,10 +108,9 @@ for resizing existing persistent volumes. This feature adds [a new option to PriorityClasses](https://github.com/kubernetes/enhancements/issues/902), which can enable or disable pod preemption. --> - ### NonPreemptingPriority 到稳定 -此功能[为 PriorityClasses 添加了一个新选项](https://github.com/kubernetes/enhancements/issues/902),可以启用或禁用 pod 抢占。 +此功能[为 PriorityClasses 添加了一个新选项](https://github.com/kubernetes/enhancements/issues/902),可以启用或禁用 Pod 抢占。 - ### 存储插件迁移 目前正在进行[迁移树内存储插件的内部组件](https://github.com/kubernetes/enhancements/issues/625)工作, @@ -145,12 +135,10 @@ has entered beta and is available by default. You can now [configure startup, li natively within Kubernetes without exposing an HTTP endpoint or using an extra executable. --> - - ### gRPC 探针升级到 Beta 在 Kubernetes 1.24 中,[gRPC 探测功能](https://github.com/kubernetes/enhancements/issues/2727) -已进入测试版,默认可用。现在,你可以在 Kubernetes 中为你的 gRPC +已进入测试版,默认可用。现在,你可以在 Kubernetes 中为你的 gRPC 应用程序原生地[配置启动、活跃度和就绪性探测](/zh-cn/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes), 而无需暴露 HTTP 端点或使用额外的可执行文件。 @@ -163,7 +151,6 @@ has now graduated to Beta. This allows the kubelet to dynamically retrieve credentials for a container image registry using exec plugins rather than storing credentials on the node's filesystem. --> - ### Kubelet 凭证提供者毕业至 Beta kubelet 最初在 Kubernetes 1.20 中作为 Alpha 发布,现在它对[镜像凭证提供者](/zh-cn/docs/tasks/kubelet-credential-provider/kubelet-credential-provider/) @@ -175,7 +162,6 @@ kubelet 最初在 Kubernetes 1.20 中作为 Alpha 发布,现在它对[镜像 Kubernetes 1.24 has introduced [contextual logging](https://github.com/kubernetes/enhancements/issues/3077) that enables the caller of a function to control all aspects of logging (output formatting, verbosity, additional values, and names). --> - ### Alpha 中的上下文日志记录 Kubernetes 1.24 引入了[上下文日志](https://github.com/kubernetes/enhancements/issues/3077) @@ -190,11 +176,12 @@ to Services. With the manual enablement of this feature, the cluster will prefer automatic assignment from the pool of Service IP addresses, thereby reducing the risk of collision. --> - ### 避免 IP 分配给服务的冲突 -Kubernetes 1.24 引入了一项新的选择加入功能,允许你[为服务的静态 IP 地址分配软保留范围](/docs/concepts/services-networking/service/#service-ip-static-sub-range)。 +Kubernetes 1.24 引入了一项新的选择加入功能, +允许你[为服务的静态 IP 地址分配软保留范围](/zh-cn/docs/concepts/services-networking/service/#service-ip-static-sub-range)。 通过手动启用此功能,集群将更喜欢从服务 IP 地址池中自动分配,从而降低冲突风险。 + - 服务的 `ClusterIP` 可以按照以下两种方式分配: * 动态,这意味着集群将自动在配置的服务 IP 范围内选择一个空闲 IP。 @@ -216,10 +202,10 @@ Service `ClusterIP` are unique; hence, trying to create a Service with a `Cluste After being deprecated in Kubernetes 1.22, Dynamic Kubelet Configuration has been removed from the kubelet. The feature will be removed from the API server in Kubernetes 1.26. --> - ### 从 Kubelet 中删除动态 Kubelet 配置 -在 Kubernetes 1.22 中被弃用后,动态 Kubelet 配置已从 kubelet 中删除。该功能将从 Kubernetes 1.26 的 API 服务器中删除。 +在 Kubernetes 1.22 中被弃用后,动态 Kubelet 配置已从 kubelet 中删除。 +该功能将从 Kubernetes 1.26 的 API 服务器中删除。 - ## CNI 版本相关的重大更改 在升级到 Kubernetes 1.24 之前,请确认你正在使用/升级到经过测试可以在此版本中正常工作的容器运行时。 @@ -251,11 +236,11 @@ With containerd v1.6.0–v1.6.3, if you do not upgrade the CNI plugins and/or declare the CNI config version, you might encounter the following "Incompatible CNI versions" or "Failed to destroy network for sandbox" error conditions. --> -当 CNI 插件尚未升级和/或 CNI 配置版本未在 CNI 配置文件中声明时,在 containerd v1.6.0–v1.6.3 +当 CNI 插件尚未升级和/或 CNI 配置版本未在 CNI 配置文件中声明时,在 containerd v1.6.0–v1.6.3 中存在 pod CNI 网络设置和拆除的服务问题。containerd 团队报告说,“这些问题在 containerd v1.6.4 中得到解决。” -在 containerd v1.6.0-v1.6.3 版本中,如果你不升级 CNI 插件和/或声明 CNI 配置版本,你可能会遇到以下 -”CNI 版本不兼容“或“为沙箱销毁网络失败”的错误情况。 +在 containerd v1.6.0-v1.6.3 版本中,如果你不升级 CNI 插件和/或声明 CNI 配置版本, +你可能会遇到以下 “Incompatible CNI versions” 或 “Failed to destroy network for sandbox” 的错误情况。 - ## CSI 快照 -_此信息是在首次发布后添加的。_ +**此信息是在首次发布后添加的。** [VolumeSnapshot v1beta1 CRD 已被移除](https://github.com/kubernetes/enhancements/issues/177)。 Kubernetes 和容器存储接口 (CSI) 的卷快照和恢复功能,提供标准化的 API 设计 (CRD) 并添加了对 CSI 卷驱动程序的 PV 快照/恢复支持,在 v1.20 中移至 GA。VolumeSnapshot v1beta1 在 v1.20 中被弃用,现在不受支持。 -有关详细信息,请参阅[KEP-177: CSI 快照](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/177-volume-snapshot#kep-177-csi-snapshot) -和[卷快照 GA 博客](https://kubernetes.io/blog/2020/12/10/kubernetes-1.20-volume-snapshot-moves-to-ga/)。 +有关详细信息,请参阅 [KEP-177: CSI 快照](https://git.k8s.io/enhancements/keps/sig-storage/177-volume-snapshot#kep-177-csi-snapshot) +和[卷快照 GA 博客](/blog/2020/12/10/kubernetes-1.20-volume-snapshot-moves-to-ga/)。 - ## 其他更新 ### 毕业到稳定 -在此版本中,有 14 项增强功能升级为稳定版: +在此版本中,有 14 项增强功能升级为稳定版: - * [容器存储接口(CSI)卷扩展](https://github.com/kubernetes/enhancements/issues/284) * [Pod 开销](https://github.com/kubernetes/enhancements/issues/688): 核算与 Pod 沙箱绑定的资源,但不包括特定的容器。 * [向 PriorityClass 添加非抢占选项](https://github.com/kubernetes/enhancements/issues/902) -* [存储容量跟踪](https://github.com/kubernetes/enhancements/issues/1472) +* [存储容量跟踪](https://github.com/kubernetes/enhancements/issues/1472) * [OpenStack Cinder In-Tree 到 CSI 驱动程序迁移](https://github.com/kubernetes/enhancements/issues/1489) * [Azure 磁盘树到 CSI 驱动程序迁移](https://github.com/kubernetes/enhancements/issues/1490) -* [高效的监视恢复](https://github.com/kubernetes/enhancements/issues/1904): kube-apiserver 重新启动后,可以高效地恢复监视。 -* [Service Type=LoadBalancer 类字段](https://github.com/kubernetes/enhancements/issues/1959): -引入新的服务注解 `service.kubernetes.io/load-balancer-class` ,允许在同一个集群中实现多个 `type: LoadBalancer` 服务在同一集群中的多个实现。 -* [指数化的作业](https://github.com/kubernetes/enhancements/issues/2214): 为有固定完成数的作业的 Pod 添加完成指数。 -* [在 Jobs API 中增加 Suspend 字段](https://github.com/kubernetes/enhancements/issues/2232): -在 Jobs API 中增加一个 suspend 字段,允许协调者在创建作业时对 pod 的创建有更多控制。 -* [Pod Affinity NamespaceSelector](https://github.com/kubernetes/enhancements/issues/2249): -为 pod affinity/anti-affinity 规范添加一个 `namespaceSelector` 字段。 -* [控制器管理器的领导者迁移](https://github.com/kubernetes/enhancements/issues/2436): -kube-controller-manager 和 cloud-controller-manager 可以在 HA 控制平面中应用新的控制器到控制器管理器分配,而无需停机。 -* [CSR 期限](https://github.com/kubernetes/enhancements/issues/2784): 用一种机制来扩展证书签名请求 API,允许客户为签发的证书请求一个特定的期限。 +* [高效的监视恢复](https://github.com/kubernetes/enhancements/issues/1904): + kube-apiserver 重新启动后,可以高效地恢复监视。 +* [Service Type=LoadBalancer 类字段](https://github.com/kubernetes/enhancements/issues/1959): + 引入新的服务注解 `service.kubernetes.io/load-balancer-class` , + 允许在同一个集群中提供 `type: LoadBalancer` 服务的多个实现。 +* [带索引的 Job](https://github.com/kubernetes/enhancements/issues/2214):为带有固定完成计数的 Job 的 Pod 添加完成索引。 +* [在 Job API 中增加 suspend 字段](https://github.com/kubernetes/enhancements/issues/2232): + 在 Job API 中增加一个 suspend 字段,允许协调者在创建作业时对 Pod 的创建进行更多控制。 +* [Pod 亲和性 NamespaceSelector](https://github.com/kubernetes/enhancements/issues/2249): + 为 Pod 亲和性/反亲和性规约添加一个 `namespaceSelector` 字段。 +* [控制器管理器的领导者迁移](https://github.com/kubernetes/enhancements/issues/2436): + kube-controller-manager 和 cloud-controller-manager 可以在 HA 控制平面中重新分配新的控制器到控制器管理器,而无需停机。 +* [CSR 期限](https://github.com/kubernetes/enhancements/issues/2784): + 用一种机制来扩展证书签名请求 API,允许客户为签发的证书请求一个特定的期限。 - ### 主要变化 此版本有两个主要变化: @@ -343,12 +327,11 @@ This release saw two major changes: - ### 发行说明 -在我们的[发行说明](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md) 中查看 Kubernetes 1.24 版本的完整详细信息。 +在我们的[发行说明](https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.24.md) 中查看 Kubernetes 1.24 版本的完整详细信息。 - ### 可用性 Kubernetes 1.24 可在 [GitHub](https://github.com/kubernetes/kubernetes/releases/tag/v1.24.0) 上下载。 -要开始使用 Kubernetes,请查看这些[交互式教程](/docs/tutorials/)或在本地运行。 -使用[kind](https://kind.sigs.k8s.io/),可以将容器作为 Kubernetes 集群的“节点”。 +要开始使用 Kubernetes,请查看这些[交互式教程](/zh-cn/docs/tutorials/)或在本地运行。 +使用 [kind](https://kind.sigs.k8s.io/),可以将容器作为 Kubernetes 集群的 “节点”。 你还可以使用 [kubeadm](/zh-cn/docs/setup/independent/create-cluster-kubeadm/) 轻松安装 1.24。 - ### 发布团队 -如果没有组成 Kubernetes 1.24 发布团队的坚定个人的共同努力,这个版本是不可能实现的。 -该团队齐心协力交付每个 Kubernetes 版本中的所有组件,包括代码、文档、发行说明等。 +如果没有组成 Kubernetes 1.24 发布团队的坚定个人的共同努力,这个版本是不可能实现的。 +该团队齐心协力交付每个 Kubernetes 版本中的所有组件,包括代码、文档、发行说明等。 特别感谢我们的发布负责人 James Laverack 指导我们完成了一个成功的发布周期, 并感谢所有发布团队成员投入时间和精力为 Kubernetes 社区提供 v1.24 版本。 @@ -395,14 +376,13 @@ release for the Kubernetes community. The theme for Kubernetes 1.24 is _Stargazer_. --> - -### 发布主题和徽标 +### 发布主题和徽标 **Kubernetes 1.24: 观星者** {{< figure src="/images/blog/2022-05-03-kubernetes-release-1.24/kubernetes-1.24.png" alt="" class="release-logo" >}} -Kubernetes 1.24 的主题是 is _观星者_. +Kubernetes 1.24 的主题是**观星者(Stargazer)**。 - 古代天文学家到建造 James Webb 太空望远镜的科学家,几代人都怀着敬畏和惊奇的心情仰望星空。 星星启发了我们,点燃了我们的想象力,并引导我们在艰难的海上度过了漫长的夜晚。 -通过此版本,我们向上凝视,当我们的社区聚集在一起时可能发生的事情。Kubernetes 是全球数百名贡献者和数千名最终用户支持的成果 -为数百万服务的应用程序。每个人都是我们天空中的一颗星星,帮助我们规划路线。 +通过此版本,我们向上凝视,当我们的社区聚集在一起时可能发生的事情。 +Kubernetes 是全球数百名贡献者和数千名最终用户支持的成果, +是一款为数百万人服务的应用程序。每个人都是我们天空中的一颗星星,帮助我们规划路线。 - 发布标志由 [Britnee Laverack](https://www.instagram.com/artsyfie/) 制作, 描绘了一架位于星空和[昴星团](https://en.wikipedia.org/wiki/Pleiades)的望远镜,在神话中通常被称为“七姐妹”。 数字 7 对于 Kubernetes 项目特别吉祥,是对我们最初的“项目七”名称的引用。 @@ -444,23 +423,23 @@ all the stargazers out there. ✨ * Using Kubernetes, the Dutch organization [Stichting Open Nederland](http://www.stichtingopennederland.nl/) created a testing portal in just one-and-a-half months to help safely reopen events in the Netherlands. The [Testing for Entry (Testen voor Toegang)](https://www.testenvoortoegang.org/) platform [leveraged the performance and scalability of Kubernetes to help individuals book over 400,000 COVID-19 testing appointments per day. ](https://www.cncf.io/case-studies/true/) * Working alongside SparkFabrik and utilizing Backstage, [Santagostino created the developer platform Samaritan to centralize services and documentation, manage the entire lifecycle of services, and simplify the work of Santagostino developers](https://www.cncf.io/case-studies/santagostino/). --> - - ### 用户亮点 -* 了解领先的零售电子商务公司 [La Redoute 如何使用 Kubernetes 以及其他 CNCF 项目来转变和简化](https://www.cncf.io/case-studies/la-redoute/) -其从开发到运营的软件交付生命周期。 +* 了解领先的零售电子商务公司 + [La Redoute 如何使用 Kubernetes 以及其他 CNCF 项目来转变和简化](https://www.cncf.io/case-studies/la-redoute/) + 其从开发到运营的软件交付生命周期。 * 为了确保对 API 调用的更改不会导致任何中断,[Salt Security 完全在 Kubernetes 上构建了它的微服务, -它通过 gRPC 进行通信,而 Linkerd 确保消息是加密的](https://www.cncf.io/case-studies/salt-security/)。 + 它通过 gRPC 进行通信,而 Linkerd 确保消息是加密的](https://www.cncf.io/case-studies/salt-security/)。 * 为了从私有云迁移到公共云,[Alllainz Direct 工程师在短短三个月内重新设计了其 CI/CD 管道, -同时设法将 200 个工作流压缩到 10-15 个](https://www.cncf.io/case-studies/allianz/)。 + 同时设法将 200 个工作流压缩到 10-15 个](https://www.cncf.io/case-studies/allianz/)。 * 看看[英国金融科技公司 Bink 是如何用 Linkerd 更新其内部的 Kubernetes 分布,以建立一个云端的平台, -根据需要进行扩展,同时允许他们密切关注性能和稳定性](https://www.cncf.io/case-studies/bink/)。 -* 利用Kubernetes,荷兰组织 [Stichting Open Nederland](http://www.stichtingopennederland.nl/) -在短短一个半月内创建了一个测试门户网站,以帮助安全地重新开放荷兰的活动。[入门测试 (Testen voor Toegang)](https://www.testenvoortoegang.org/) -平台[利用 Kubernetes 的性能和可扩展性来帮助个人每天预订超过 400,000 个 COVID-19 测试预约。](https://www.cncf.io/case-studies/true/) + 根据需要进行扩展,同时允许他们密切关注性能和稳定性](https://www.cncf.io/case-studies/bink/)。 +* 利用Kubernetes,荷兰组织 [Stichting Open Nederland](http://www.stichtingopennederland.nl/) + 在短短一个半月内创建了一个测试门户网站,以帮助安全地重新开放荷兰的活动。 + [入门测试 (Testen voor Toegang)](https://www.testenvoortoegang.org/) + 平台[利用 Kubernetes 的性能和可扩展性来帮助个人每天预订超过 400,000 个 COVID-19 测试预约](https://www.cncf.io/case-studies/true/)。 * 与 SparkFabrik 合作并利用 Backstage,[Santagostino 创建了开发人员平台 Samaritan 来集中服务和文档, -管理服务的整个生命周期,并简化 Santagostino 开发人员的工作](https://www.cncf.io/case-studies/santagostino/)。 + 管理服务的整个生命周期,并简化 Santagostino 开发人员的工作](https://www.cncf.io/case-studies/santagostino/)。 - ### 生态系统更新 * KubeCon + CloudNativeCon Europe 2022 将于 2022 年 5 月 16 日至 20 日在西班牙巴伦西亚举行! -你可以在 [活动网站](https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/) -上找到有关会议和注册的更多信息。 -* 在 [2021 Cloud Native Survey](https://www.cncf.io/announcements/2022/02/10/cncf-sees-record-kubernetes-and-container-adoption-in-2021-cloud-native-survey/) -中,CNCF 看到了创纪录的 Kubernetes 和容器采用。看看[调查结果](https://www.cncf.io/reports/cncf-annual-survey-2021/)。 + 你可以在[活动网站](https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/)上找到有关会议和注册的更多信息。 +* 在 [2021 年云原生调查](https://www.cncf.io/announcements/2022/02/10/cncf-sees-record-kubernetes-and-container-adoption-in-2021-cloud-native-survey/) + 中,CNCF 看到了创纪录的 Kubernetes 和容器采用。参阅[调查结果](https://www.cncf.io/reports/cncf-annual-survey-2021/)。 * [Linux 基金会](https://www.linuxfoundation.org/)和[云原生计算基金会](https://www.cncf.io/) (CNCF) -宣布推出新的 [云原生开发者训练营](https://training.linuxfoundation.org/training/cloudnativedev-bootcamp/?utm_source=lftraining&utm_medium=pr&utm_campaign=clouddevbc0322) -为参与者提供设计、构建和部署云原生应用程序的知识和技能。查看[公告](https://www.cncf.io/announcements/2022/03/15/new-cloud-native-developer-bootcamp-provides-a-clear-path-to-cloud-native-careers/)以了解更多信息。 - + 宣布推出新的 [云原生开发者训练营](https://training.linuxfoundation.org/training/cloudnativedev-bootcamp/?utm_source=lftraining&utm_medium=pr&utm_campaign=clouddevbc0322) + 为参与者提供设计、构建和部署云原生应用程序的知识和技能。查看[公告](https://www.cncf.io/announcements/2022/03/15/new-cloud-native-developer-bootcamp-provides-a-clear-path-to-cloud-native-careers/)以了解更多信息。 - - ### 项目速度 The [CNCF K8s DevStats](https://k8s.devstats.cncf.io/d/12/dashboards?orgId=1&refresh=15m) 项目 @@ -512,19 +486,17 @@ the major features of this release, as well as deprecations and removals to help For more information and registration, visit the [event page](https://community.cncf.io/e/mck3kd/) on the CNCF Online Programs site. --> - - ## 即将发布的网络研讨会 在太平洋时间 2022 年 5 月 24 日星期二上午 9:45 至上午 11 点加入 Kubernetes 1.24 发布团队的成员, -了解此版本的主要功能以及弃用和删除,以帮助规划升级。有关更多信息和注册,请访问 CNCF 在线计划网站上的 -[活动页面](https://community.cncf.io/e/mck3kd/)。 +了解此版本的主要功能以及弃用和删除,以帮助规划升级。有关更多信息和注册, +请访问 CNCF 在线计划网站上的[活动页面](https://community.cncf.io/e/mck3kd/)。 - ## 参与进来 -参与 Kubernetes 的最简单方法是加入符合你兴趣的众多 [特别兴趣组](https://github.com/kubernetes/community/blob/master/sig-list.md)(SIG) 之一。 -你有什么想向 Kubernetes 社区广播的内容吗?在我们的每周的[社区会议](https://github.com/kubernetes/community/tree/master/communication) -上分享你的声音,并通过以下渠道: +参与 Kubernetes 的最简单方法是加入符合你兴趣的众多 [特别兴趣组](https://git.k8s.io/community/sig-list.md)(SIG) 之一。 +你有什么想向 Kubernetes 社区广播的内容吗? +在我们的每周的[社区会议](https://git.k8s.io/community/communication)上分享你的声音,并通过以下渠道: * 在 [Kubernetes Contributors](https://www.kubernetes.dev/) 网站上了解有关为 Kubernetes 做出贡献的更多信息 * 在 Twitter 上关注我们 [@Kubernetesio](https://twitter.com/kubernetesio) 以获取最新更新 @@ -548,5 +519,5 @@ Have something you’d like to broadcast to the Kubernetes community? Share your * 加入 [Slack](http://slack.k8s.io/) 社区 * 在 [Server Fault](https://serverfault.com/questions/tagged/kubernetes) 上发布问题(或回答问题)。 * 分享你的 Kubernetes [故事](https://docs.google.com/a/linuxfoundation.org/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform) -* 在[博客](https://kubernetes.io/blog/)上阅读有关 Kubernetes 正在发生的事情的更多信息 -* 详细了解 [Kubernetes 发布团队](https://github.com/kubernetes/sig-release/tree/master/release-team) +* 在[博客](/zh-cn/blog/)上阅读有关 Kubernetes 正在发生的事情的更多信息 +* 详细了解 [Kubernetes 发布团队](https://git.k8s.io/sig-release/release-team) diff --git a/content/zh-cn/blog/_posts/2022-06-01-annual-report-2021.md b/content/zh-cn/blog/_posts/2022-06-01-annual-report-2021.md index 93c119560b..412fabe2fe 100644 --- a/content/zh-cn/blog/_posts/2022-06-01-annual-report-2021.md +++ b/content/zh-cn/blog/_posts/2022-06-01-annual-report-2021.md @@ -14,7 +14,7 @@ slug: annual-report-summary-2021 -**作者:**Paris Pittman(指导委员会) +**作者:** Paris Pittman(指导委员会) -一些 kubelet 垃圾收集功能已被弃用,以支持驱逐。 -有关已弃用功能的列表,请参阅 -[kubelet 垃圾收集弃用](/zh-cn/docs/concepts/cluster-administration/kubelet-garbage-collection/#deprecation)。 -{{}} +一些 kubelet 垃圾收集功能已被弃用,以鼓励使用驱逐机制。 + +| 现有标志 | 新的标志 | 原因 | +| ------------- | -------- | --------- | +| `--image-gc-high-threshold` | `--eviction-hard` 或 `--eviction-soft` | 现有的驱逐信号可以触发镜像垃圾收集 | +| `--image-gc-low-threshold` | `--eviction-minimum-reclaim` | 驱逐回收具有相同的行为 | +| `--maximum-dead-containers` | - | 一旦旧的日志存储在容器的上下文之外就会被弃用 | +| `--maximum-dead-containers-per-container` | - | 一旦旧的日志存储在容器的上下文之外就会被弃用 | +| `--minimum-container-ttl-duration` | - | 一旦旧的日志存储在容器的上下文之外就会被弃用 | -当 kubelet 因 inode 或 PID 不足而驱逐 pod 时, +当 kubelet 因 inode 或 PID 不足而驱逐 Pod 时, 它使用优先级来确定驱逐顺序,因为 inode 和 PID 没有请求。 kubelet 根据节点是否具有专用的 `imagefs` 文件系统对 Pod 进行不同的排序: @@ -648,7 +659,7 @@ Consider the following scenario: * 节点内存容量:`10Gi` * 操作员希望为系统守护进程(内核、`kubelet` 等)保留 10% 的内存容量 -* 操作员希望驱逐内存利用率为 95% 的Pod,以减少系统 OOM 的概率。 +* 操作员希望驱逐内存利用率为 95% 的 Pod,以减少系统 OOM 的概率。 -更多细节请参见 [https://github.com/kubernetes/kubernetes/issues/43916](https://github.com/kubernetes/kubernetes/issues/43916) +更多细节请参见 [https://github.com/kubernetes/kubernetes/issues/43916](https://github.com/kubernetes/kubernetes/issues/43916)。 你可以通过为可能执行 I/O 密集型活动的容器设置相同的内存限制和内存请求来应对该行为。 你将需要估计或测量该容器的最佳内存限制值。 @@ -765,14 +776,14 @@ to estimate or measure an optimal memory limit value for that container. ## {{% heading "whatsnext" %}} -* 了解 [API 发起的驱逐](/docs/reference/generated/kubernetes-api/v1.23/) -* 了解 [Pod 优先级和驱逐](/zh-cn/docs/concepts/scheduling-eviction/pod-priority-preemption/) -* 了解 [PodDisruptionBudgets](/docs/tasks/run-application/configure-pdb/) +* 了解 [API 发起的驱逐](/zh-cn/docs/concepts/scheduling-eviction/api-eviction/) +* 了解 [Pod 优先级和抢占](/zh-cn/docs/concepts/scheduling-eviction/pod-priority-preemption/) +* 了解 [PodDisruptionBudgets](/zh-cn/docs/tasks/run-application/configure-pdb/) * 了解[服务质量](/zh-cn/docs/tasks/configure-pod-container/quality-service-pod/)(QoS) * 查看[驱逐 API](/docs/reference/generated/kubernetes-api/{{}}/#create-eviction-pod-v1-core) From 99b173cc6b998a84f57bdd3c63694b715524a6b2 Mon Sep 17 00:00:00 2001 From: windsonsea Date: Sat, 16 Jul 2022 13:52:06 +0800 Subject: [PATCH 14/14] [zh-cn] updated /kubernetes-api/service-resources/ingress-class-v1.md --- .../service-resources/ingress-class-v1.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/content/zh-cn/docs/reference/kubernetes-api/service-resources/ingress-class-v1.md b/content/zh-cn/docs/reference/kubernetes-api/service-resources/ingress-class-v1.md index 54b62f404c..81f308cbaf 100644 --- a/content/zh-cn/docs/reference/kubernetes-api/service-resources/ingress-class-v1.md +++ b/content/zh-cn/docs/reference/kubernetes-api/service-resources/ingress-class-v1.md @@ -4,13 +4,12 @@ api_metadata: import: "k8s.io/api/networking/v1" kind: "IngressClass" content_type: "api_reference" -description: "IngressClass 代表 Ingress 的类, 被 Ingress 的规约引用。" +description: "IngressClass 代表 Ingress 的类,被 Ingress 的规约引用。" title: "IngressClass" weight: 5 --- `apiVersion: networking.k8s.io/v1` @@ -34,8 +32,9 @@ IngressClass represents the class of the Ingress, referenced by the Ingress Spec --> ## IngressClass {#IngressClass} -IngressClass 代表 Ingress 的类, 被 Ingress 的规约引用。 -`ingressclass.kubernetes.io/is-default-class` 注解可以用来标明一个 IngressClass 应该被视为默认的 Ingress 类。 +IngressClass 代表 Ingress 的类,被 Ingress 的规约引用。 +`ingressclass.kubernetes.io/is-default-class` +注解可以用来标明一个 IngressClass 应该被视为默认的 Ingress 类。 当某个 IngressClass 资源将此注解设置为 true 时, 没有指定类的新 Ingress 资源将被分配到此默认类。 @@ -50,22 +49,23 @@ IngressClass 代表 Ingress 的类, 被 Ingress 的规约引用。 - 标准的列表元数据。 - 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + 标准的列表元数据。更多信息: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - **spec** (}}">IngressClassSpec) - spec 是 IngressClass 的期望状态。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + spec 是 IngressClass 的期望状态。更多信息: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status ## IngressClassSpec {#IngressClassSpec} -IngressClassSpec 提供有关 Ingress 类的信息。 +IngressClassSpec 提供有关 Ingress 类的信息。
@@ -120,14 +120,16 @@ IngressClassSpec 提供有关 Ingress 类的信息。 apiGroup 是被引用资源的组。 如果未指定 apiGroup,则被指定的 kind 必须在核心 API 组中。 - 对于任何其他第三方类型, APIGroup 是必需的。 + 对于任何其他第三方类型,apiGroup 是必需的。 - **parameters.namespace** (string) - namespace 是被引用资源的命名空间。当范围被设置为 “namespace” 时,此字段是必需的,当范围被设置为 “Cluster”,此字段必须取消设置。 + namespace 是被引用资源的命名空间。 + 当范围被设置为 “namespace” 时,此字段是必需的; + 当范围被设置为 “Cluster” 时,此字段必须不设置。 - **parameters.scope** (string) - **items** ([]}}">IngressClass),必需 - items 是 IngressClasses 的列表 + items 是 IngressClasses 的列表。