Skip to content

Commit

Permalink
Merge pull request #46024 from my-git9/patch-4759
Browse files Browse the repository at this point in the history
[zh-cn]sync policy kubernetes-api kubeadm-config.v1beta3 hello-minikube apiserver-audit.v1
  • Loading branch information
k8s-ci-robot committed Apr 27, 2024
2 parents bb1724b + 41fe371 commit 52784d0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 79 deletions.
57 changes: 6 additions & 51 deletions content/zh-cn/docs/concepts/overview/kubernetes-api.md
Expand Up @@ -132,10 +132,10 @@ API 以聚合和非聚合形式提供。聚合的发现提供两个端点,而
-->
### 聚合的发现 {#aggregated-discovery}

{{< feature-state state="beta" for_k8s_version="v1.27" >}}
{{< feature-state feature_gate_name="AggregatedDiscoveryEndpoint" >}}

<!--
Kubernetes offers beta support for aggregated discovery, publishing
Kubernetes offers beta support for _aggregated discovery_, publishing
all resources supported by a cluster through two endpoints (`/api` and
`/apis`). Requesting this
endpoint drastically reduces the number of requests sent to fetch the
Expand All @@ -144,7 +144,7 @@ requesting the respective endpoints with an `Accept` header indicating
the aggregated discovery resource:
`Accept: application/json;v=v2beta1;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`.
-->
Kubernetes 为聚合的发现提供了 Beta 支持,通过两个端点(`/api``/apis`)发布集群所支持的所有资源。
Kubernetes **聚合的发现**提供了 Beta 支持,通过两个端点(`/api``/apis`)发布集群所支持的所有资源。
请求这个端点会大大减少从集群获取发现数据时发送的请求数量。你可以通过带有
`Accept` 头(`Accept: application/json;v=v2beta1;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`
的请求发送到不同端点,来指明聚合发现的资源。
Expand All @@ -157,7 +157,7 @@ document.
如果没有使用 `Accept` 头指示资源类型,对于 `/api``/apis` 端点的默认响应将是一个非聚合的发现文档。

<!--
The [discovery document](https://github.com/kubernetes/kubernetes/blob/release-{{< skew currentVersion >}}/api/discovery/aggregated_v2beta1.json)
The [discovery document](https://github.com/kubernetes/kubernetes/blob/release-{{< skew currentVersion >}}/api/discovery/aggregated_v2.json)
for the built-in resources can be found in the Kubernetes GitHub repository.
This Github document can be used as a reference of the base set of the available resources
if a Kubernetes cluster is not available to query.
Expand Down Expand Up @@ -455,51 +455,6 @@ Kubernetes stores the serialized state of objects by writing them into

Kubernetes 通过将序列化状态的对象写入到 {{< glossary_tooltip term_id="etcd" >}} 中完成存储操作。

<!--
## API Discovery
A list of all group versions supported by a cluster is published at
the `/api` and `/apis` endpoints. Each group version also advertises
the list of resources supported via `/apis/<group>/<version>` (for
example: `/apis/rbac.authorization.k8s.io/v1alpha1`). These endpoints
are used by kubectl to fetch the list of resources supported by a
cluster.
-->
## API 发现 {#api-discovery}

集群支持的所有组版本列表被发布在 `/api``/apis` 端点。
每个组版本还会通过 `/apis/<group>/<version>`
(例如 `/apis/rbac.authorization.k8s.io/v1alpha1`)广播支持的资源列表。
这些端点由 kubectl 用于获取集群支持的资源列表。

<!--
### Aggregated Discovery
-->
### 聚合发现 {#aggregated-discovery}

{{< feature-state state="beta" for_k8s_version="v1.27" >}}

<!--
Kubernetes offers beta support for aggregated discovery, publishing
all resources supported by a cluster through two endpoints (`/api` and
`/apis`) compared to one for every group version. Requesting this
endpoint drastically reduces the number of requests sent to fetch the
discovery for the average Kubernetes cluster. This may be accessed by
requesting the respective endpoints with an Accept header indicating
the aggregated discovery resource:
`Accept: application/json;v=v2beta1;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`.
The endpoint also supports ETag and protobuf encoding.
-->
Kubernetes 对聚合发现提供 Beta 支持,通过两个端点(`/api``/apis`
发布集群支持的所有资源,而不是每个组版本都需要一个端点。
请求此端点显著减少了获取平均 Kubernetes 集群发现而发送的请求数量。
通过请求各自的端点并附带表明聚合发现资源
`Accept: application/json;v=v2beta1;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList`
的 Accept 头部来进行访问。

该端点还支持 ETag 和 protobuf 编码。

<!--
## API groups and versioning
Expand All @@ -512,7 +467,7 @@ to ensure that the API presents a clear, consistent view of system resources
and behavior, and to enable controlling access to end-of-life and/or
experimental APIs.
-->
## API 组和版本控制 {#api-groups-and-versioning}
## API 组和版本控制 {#api-groups-and-versioning}

为了更容易消除字段或重组资源的呈现方式,Kubernetes 支持多个 API 版本,每个版本位于不同的 API 路径,
例如 `/api/v1``/apis/rbac.authorization.k8s.io/v1alpha1`
Expand Down Expand Up @@ -562,7 +517,7 @@ compatibility for a length of time so that other projects have an opportunity to

任何成功的系统都要随着新的使用案例的出现和现有案例的变化来成长和变化。
为此,Kubernetes 已设计了 Kubernetes API 来持续变更和成长。
Kubernetes 项目的目标是 **不要** 给现有客户端带来兼容性问题,并在一定的时期内维持这种兼容性,
Kubernetes 项目的目标是**不要**给现有客户端带来兼容性问题,并在一定的时期内维持这种兼容性,
以便其他项目有机会作出适应性变更。

<!--
Expand Down
2 changes: 1 addition & 1 deletion content/zh-cn/docs/concepts/policy/_index.md
Expand Up @@ -137,7 +137,7 @@ Kubernetes 生态系统中正在开发作为灵活策略引擎的动态准入控
## Apply policies using Kubelet configurations
Kubernetes allows configuring the Kubelet on each worker node. Some Kubelet configurations act as policies:
* [Process ID limts and reservations](/docs/concepts/policy/pid-limiting/) are used to limit and reserve allocatable PIDs.
* [Process ID limits and reservations](/docs/concepts/policy/pid-limiting/) are used to limit and reserve allocatable PIDs.
* [Node Resource Managers](/docs/concepts/policy/node-resource-managers/) can manage compute, memory, and device resources for latency-critical and high-throughput workloads.
-->
## 使用 Kubelet 配置应用策略 {#apply-policies-using-kubelet-configurations}
Expand Down
18 changes: 9 additions & 9 deletions content/zh-cn/docs/reference/config-api/apiserver-audit.v1.md
@@ -1,5 +1,5 @@
---
title: kube-apiserver Audit 配置 (v1)
title: kube-apiserver Audit 配置(v1)
content_type: tool-reference
package: audit.k8s.io/v1
---
Expand Down Expand Up @@ -111,7 +111,7 @@ Event 结构包含可出现在 API 审计日志中的所有信息。
</tr>

<tr><td><code>user</code> <B><!--[Required]-->[必需]</B><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#userinfo-v1-authentication-k8s-io"><code>authentication/v1.UserInfo</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#userinfo-v1-authentication-k8s-io"><code>authentication/v1.UserInfo</code></a>
</td>
<td>
<p>
Expand All @@ -124,7 +124,7 @@ Event 结构包含可出现在 API 审计日志中的所有信息。
</tr>

<tr><td><code>impersonatedUser</code><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#userinfo-v1-authentication-k8s-io"><code>authentication/v1.UserInfo</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#userinfo-v1-authentication-k8s-io"><code>authentication/v1.UserInfo</code></a>
</td>
<td>
<p>
Expand Down Expand Up @@ -204,7 +204,7 @@ Note: All but the last IP can be arbitrarily set by the client.
</tr>

<tr><td><code>responseStatus</code><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#status-v1-meta"><code>meta/v1.Status</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#status-v1-meta"><code>meta/v1.Status</code></a>
</td>
<td>
<p>
Expand Down Expand Up @@ -257,7 +257,7 @@ Note: All but the last IP can be arbitrarily set by the client.
</tr>

<tr><td><code>requestReceivedTimestamp</code><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
</td>
<td>
<!--
Expand All @@ -270,7 +270,7 @@ Note: All but the last IP can be arbitrarily set by the client.
</tr>

<tr><td><code>stageTimestamp</code><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
</td>
<td>
<p>
Expand Down Expand Up @@ -326,7 +326,7 @@ EventList 是审计事件(Event)的列表。
<tr><td><code>kind</code><br/>string</td><td><code>EventList</code></td></tr>

<tr><td><code>metadata</code><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
</td>
<td>
<span class="text-muted"><!--No description provided.-->列表结构元数据</span>
Expand Down Expand Up @@ -368,7 +368,7 @@ Policy 定义的是审计日志的配置以及不同类型请求的日志记录
<tr><td><code>kind</code><br/>string</td><td><code>Policy</code></td></tr>

<tr><td><code>metadata</code><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#objectmeta-v1-meta"><code>meta/v1.ObjectMeta</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#objectmeta-v1-meta"><code>meta/v1.ObjectMeta</code></a>
</td>
<td>
<p>
Expand Down Expand Up @@ -458,7 +458,7 @@ PolicyList 是由审计策略(Policy)组成的列表。
<tr><td><code>kind</code><br/>string</td><td><code>PolicyList</code></td></tr>

<tr><td><code>metadata</code><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
</td>
<td>
<span class="text-muted"><!--No description provided.-->列表结构元数据。</span>
Expand Down
@@ -1,5 +1,5 @@
---
title: kubeadm 配置 (v1beta3)
title: kubeadm 配置v1beta3
content_type: tool-reference
package: kubeadm.k8s.io/v1beta3
---
Expand Down Expand Up @@ -496,7 +496,7 @@ for, so other administrators can know its purpose.
</td>
</tr>
<tr><td><code>expires</code><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#time-v1-meta"><code>meta/v1.Time</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#time-v1-meta"><code>meta/v1.Time</code></a>
</td>
<td>
<!--
Expand Down Expand Up @@ -1531,7 +1531,7 @@ HostPathMount contains elements describing volumes that are mounted from the hos
</td>
</tr>
<tr><td><code>pathType</code><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#hostpathtype-v1-core"><code>core/v1.HostPathType</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#hostpathtype-v1-core"><code>core/v1.HostPathType</code></a>
</td>
<td>
<!--
Expand Down Expand Up @@ -1827,7 +1827,7 @@ This information will be annotated to the Node API object, for later re-use.
</td>
</tr>
<tr><td><code>taints</code> <B><!--[Required]-->[必需]</B><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#taint-v1-core"><code>[]core/v1.Taint</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#taint-v1-core"><code>[]core/v1.Taint</code></a>
</td>
<td>
<!--
Expand Down Expand Up @@ -1880,7 +1880,7 @@ the current node is registered, e.g.
</td>
</tr>
<tr><td><code>imagePullPolicy</code><br/>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#pullpolicy-v1-core"><code>core/v1.PullPolicy</code></a>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#pullpolicy-v1-core"><code>core/v1.PullPolicy</code></a>
</td>
<td>
<!--
Expand Down
14 changes: 1 addition & 13 deletions content/zh-cn/docs/tutorials/hello-minikube.md
Expand Up @@ -2,12 +2,6 @@
title: 你好,Minikube
content_type: tutorial
weight: 5
menu:
main:
title: "Get Started"
weight: 10
post: >
<p>准备好动手操作了么?构建一个简单的 Kubernetes 集群来运行示例应用。</p>
card:
name: tutorials
weight: 10
Expand All @@ -16,12 +10,6 @@ card:
title: Hello Minikube
content_type: tutorial
weight: 5
menu:
main:
title: "Get Started"
weight: 10
post: >
<p>Ready to get your hands dirty? Build a simple Kubernetes cluster that runs a sample app.</p>
card:
name: tutorials
weight: 10
Expand Down Expand Up @@ -288,7 +276,7 @@ Kubernetes [*Service*](/docs/concepts/services-networking/service/).

默认情况下,Pod 只能通过 Kubernetes 集群中的内部 IP 地址访问。
要使得 `hello-node` 容器可以从 Kubernetes 虚拟网络的外部访问,你必须将 Pod
暴露为 Kubernetes [**Service**](/zh-cn/docs/concepts/services-networking/service/)
通过 Kubernetes [**Service**](/zh-cn/docs/concepts/services-networking/service/) 公开出来

<!--
1. Expose the Pod to the public internet using the `kubectl expose` command:
Expand Down

0 comments on commit 52784d0

Please sign in to comment.