[zh] Fix link for /docs/reference/generated
This commit is contained in:
@@ -127,7 +127,7 @@ HTTP verb for a **patch** is PATCH.
|
||||
-->
|
||||
### API 动词 {#api-verbs}
|
||||
|
||||
几乎所有对象资源类型都支持标准 HTTP 动词 - GET、POST、PUT、PATCH 和 DELETE。
|
||||
几乎所有对象资源类型都支持标准 HTTP 动词 - GET、POST、PUT、PATCH 和 DELETE。
|
||||
Kubernetes 也使用自己的动词,这些动词通常写成小写,以区别于 HTTP 动词。
|
||||
|
||||
Kubernetes 使用术语 **list** 来描述返回资源[集合](#collections),
|
||||
@@ -315,7 +315,7 @@ this is called a `Reflector` and is located in the `k8s.io/client-go/tools/cache
|
||||
并基于新返回的 `resourceVersion` 来开始新的 **watch** 操作。
|
||||
|
||||
对于订阅集合,Kubernetes 客户端库通常会为 **list** -然后- **watch** 的逻辑提供某种形式的标准工具。
|
||||
(在 Go 客户端库中,这称为`反射器(Reflector)`,位于 `k8s.io/client-go/tools/cache` 包中。)
|
||||
(在 Go 客户端库中,这称为 `反射器(Reflector)`,位于 `k8s.io/client-go/tools/cache` 包中。)
|
||||
|
||||
<!--
|
||||
### Watch bookmarks
|
||||
@@ -525,7 +525,7 @@ last chunk), then there are no more remaining items and the API server does not
|
||||
is estimating the size of a collection.
|
||||
-->
|
||||
`remainingItemCount` 是集合中未包含在此响应中的后续项目的数量。
|
||||
如果 **list** 请求包含标签或字段{{< glossary_tooltip text="选择器" term_id="selector">}} ,
|
||||
如果 **list** 请求包含标签或字段{{< glossary_tooltip text="选择器" term_id="selector">}},
|
||||
则剩余项目的数量是未知的,并且 API 服务器在其响应中不包含 `remainingItemCount` 字段。
|
||||
如果 **list** 是完整的(因为它没有分块,或者因为这是最后一个块),没有更多的剩余项目,
|
||||
API 服务器在其响应中不包含 `remainingItemCount` 字段。
|
||||
@@ -660,7 +660,7 @@ had to be in place for types unrecognized by a client.
|
||||
-->
|
||||
## 以表格形式接收资源 {#receiving-resources-as-tables}
|
||||
|
||||
当你执行`kubectl get` 时,默认的输出格式是特定资源类型的一个或多个实例的简单表格形式。
|
||||
当你执行 `kubectl get` 时,默认的输出格式是特定资源类型的一个或多个实例的简单表格形式。
|
||||
过去,客户端需要重复 `kubectl` 中所实现的表格输出和描述输出逻辑,以执行
|
||||
简单的对象列表操作。
|
||||
该方法的一些限制包括处理某些对象时的不可忽视逻辑。
|
||||
@@ -775,7 +775,7 @@ header appropriately.
|
||||
默认情况下,Kubernetes 返回序列化为 JSON 的对象,内容类型为 `application/json`。
|
||||
这是 API 的默认序列化格式。
|
||||
但是,客户端可能会使用更有效的 [Protobuf 表示](#protobuf-encoding) 请求这些对象,
|
||||
以获得更好的大规模性能。 Kubernetes API 实现标准的 HTTP 内容类型协商:
|
||||
以获得更好的大规模性能。Kubernetes API 实现标准的 HTTP 内容类型协商:
|
||||
带有 `Accept` 请求头部的 `GET` 调用会请求服务器尝试以你的首选媒体类型返回响应,
|
||||
而将 Protobuf 中的对象发送到服务器以进行 `PUT` 或 `POST` 调用意味着你必须适当地设置
|
||||
`Content-Type` 请求头。
|
||||
@@ -846,7 +846,7 @@ content types in the request `Accept` header to support fallback to JSON.
|
||||
For example:
|
||||
-->
|
||||
并非所有 API 资源类型都支持 Protobuf;具体来说,
|
||||
Protobuf 不适用于定义为 {{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinitions" >}}
|
||||
Protobuf 不适用于定义为 {{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinitions" >}}
|
||||
或通过{{< glossary_tooltip text="聚合层" term_id="aggregation-layer" >}}提供服务的资源。
|
||||
作为客户端,如果你可能需要使用扩展类型,则应在请求 `Accept` 请求头中指定多种内容类型以支持回退到 JSON。
|
||||
例如:
|
||||
@@ -1100,7 +1100,7 @@ that they do not have side effects, by setting their `sideEffects` field to `Non
|
||||
-->
|
||||
如果请求的非试运行版本会触发具有副作用的准入控制器,则该请求将失败,而不是冒不希望的副作用的风险。
|
||||
所有内置准入控制插件都支持试运行。
|
||||
此外,准入 Webhook 还可以设置[配置对象](/zh/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#webhook-v1beta1-admissionregistration-k8s-io)
|
||||
此外,准入 Webhook 还可以设置[配置对象](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#webhook-v1beta1-admissionregistration-k8s-io)
|
||||
的 `sideEffects` 字段为 `None`,借此声明它们没有副作用。
|
||||
|
||||
<!--
|
||||
@@ -1154,7 +1154,7 @@ Some values of an object are typically generated before the object is persisted.
|
||||
* `creationTimestamp` / `deletionTimestamp`:记录对象的创建/删除时间
|
||||
* `UID`:[唯一标识](/zh/docs/concepts/overview/working-with-objects/names/#uids)对象,
|
||||
取值随机生成(非确定性)
|
||||
* `resourceVersion`: 跟踪对象的持久化(存储)版本
|
||||
* `resourceVersion`:跟踪对象的持久化(存储)版本
|
||||
* 变更性准入控制器所设置的字段
|
||||
* 对于 `Service` 资源:`kube-apiserver` 为 `Service` 对象分配的端口和 IP 地址
|
||||
|
||||
@@ -1281,9 +1281,9 @@ API 服务器根据你请求的操作和 `resourceVersion` 的值对 `resourceVe
|
||||
For **get** and **list**, the semantics of `resourceVersion` are:
|
||||
|
||||
-->
|
||||
### **get** 和 **list** 语义
|
||||
### **get** 和 **list** 语义 {#semantics-for-get-and-list}
|
||||
|
||||
对于 **get** 和 **list** 而言,`resourceVersion`的语义为:
|
||||
对于 **get** 和 **list** 而言,`resourceVersion` 的语义为:
|
||||
|
||||
**get:**
|
||||
|
||||
@@ -1453,8 +1453,8 @@ the object is when served.
|
||||
|
||||
{{< note >}}
|
||||
当你 **list** 资源并收到集合响应时,
|
||||
响应包括集合的[元数据](/zh/docs/reference/generated/kubernetes-api/v1.21/#listmeta-v1-meta)
|
||||
以及该集合中每个项目的[对象元数据](/zh/docs/reference/generated/kubernetes-api/v1.21/#listmeta-v1-meta)。
|
||||
响应包括集合的[元数据](/docs/reference/generated/kubernetes-api/v1.21/#listmeta-v1-meta)
|
||||
以及该集合中每个项目的[对象元数据](/docs/reference/generated/kubernetes-api/v1.21/#listmeta-v1-meta)。
|
||||
对于在集合响应中找到的单个对象,`.metadata.resourceVersion` 跟踪该对象的最后更新时间,
|
||||
而不是对象在服务时的最新程度。
|
||||
{{< /note >}}
|
||||
@@ -1484,7 +1484,7 @@ example, the client might fall back to a request with `limit` set.
|
||||
|
||||
For watch, the semantics of resource version are:
|
||||
-->
|
||||
### **watch** 语义
|
||||
### **watch** 语义 {#semantics-for-watch}
|
||||
|
||||
对于 watch 操作而言,资源版本的语义如下:
|
||||
|
||||
@@ -1628,4 +1628,4 @@ available.
|
||||
kube-apiserver 还会使用 “Too large resource version” 消息额外标识其错误响应。
|
||||
|
||||
如果你对无法识别的资源版本发出 **watch** 请求,
|
||||
API 服务器可能会无限期地等待(直到请求超时)资源版本变为可用。
|
||||
API 服务器可能会无限期地等待(直到请求超时)资源版本变为可用。
|
||||
Reference in New Issue
Block a user