Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions content/zh-cn/docs/reference/access-authn-authz/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ weight: 36
<!--
A WebHook is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST. A web application implementing WebHooks will POST a message to a URL when certain things happen.
-->
WebHook 是一种 HTTP 回调:某些条件下触发的 HTTP POST 请求;通过 HTTP POST
发送的简单事件通知。一个基于 web 应用实现的 WebHook 会在特定事件发生时把消息发送给特定的 URL。
Webhook 是一种 HTTP 回调:某些条件下触发的 HTTP POST 请求;通过 HTTP POST
发送的简单事件通知。一个基于 web 应用实现的 Webhook 会在特定事件发生时把消息发送给特定的 URL。

<!-- body -->

Expand Down Expand Up @@ -129,8 +129,9 @@ action. This object contains fields describing the user attempting to make the
request, and either details about the resource being accessed or requests
attributes.
-->
在做认证决策时,API 服务器会 POST 一个 JSON 序列化的 `authorization.k8s.io/v1beta1` `SubjectAccessReview`
对象来描述这个动作。这个对象包含了描述用户请求的字段,同时也包含了需要被访问资源或请求特征的具体信息。
在做认证决策时,API 服务器会 POST 一个 JSON 序列化的 `authorization.k8s.io/v1beta1`
`SubjectAccessReview` 对象来描述这个动作。这个对象包含了描述用户请求的字段,
同时也包含了需要被访问资源或请求特征的具体信息。

<!--
Note that webhook API objects are subject to the same [versioning compatibility rules](/docs/concepts/overview/kubernetes-api/)
Expand Down Expand Up @@ -239,7 +240,7 @@ The webhook would return:
<!--
Access to non-resource paths are sent as:
-->
对于非资源的路径访问是这么发送的:
对于非资源的路径访问是这么发送的

```json
{
Expand All @@ -262,12 +263,13 @@ Access to non-resource paths are sent as:
{{< feature-state feature_gate_name="AuthorizeWithSelectors" >}}

<!--
With the `AuthorizeWithSelectors` feature enabled, field and label selectors in the request
are passed to the authorization webhook. The webhook can make authorization decisions
When calling out to an authorization webhook, Kubernetes passes
label and field selectors in the request to the authorization webhook.
The authorization webhook can make authorization decisions
informed by the scoped field and label selectors, if it wishes.
-->
启用 `AuthorizeWithSelectors` 特性后,请求中的字段和标签选择算符将被传递给授权 Webhook。
Webhook 可以根据作用域字段和标签选择算符做出授权决策(如果它愿意的话)。
当调用授权 Webhook 时,Kubernetes 会在请求中向授权 Webhook 传递标签和字段选择器
此授权 Webhook 可以根据作用域字段和标签选择算符做出授权决策(如果它愿意的话)。

<!--
The [SubjectAccessReview API documentation](/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1/)
Expand All @@ -276,7 +278,8 @@ specifically using the parsed requirements rather than the raw selector strings,
and how to handle unrecognized operators safely.
-->
[SubjectAccessReview API 文档](/zh-cn/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1/)提供了这些字段应如何被授权
Webhook 解释和处理的指南,特别是应使用解析后的要求而不是原始选择算符字符串,以及如何安全地处理未识别的操作符。
Webhook 解释和处理的指南,特别是应使用解析后的要求而不是原始选择算符字符串,
以及如何安全地处理未识别的操作符。

```json
{
Expand Down Expand Up @@ -328,4 +331,4 @@ and
-->
更多信息请参阅
[SubjectAccessReview API 文档](/zh-cn/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1/)和
[webhook.go 实现](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go)。
[`webhook.go` 实现](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go)。
19 changes: 11 additions & 8 deletions content/zh-cn/docs/reference/glossary/persistent-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ date: 2018-04-12
full_link: /zh-cn/docs/concepts/storage/persistent-volumes/
short_description: >
持久卷是代表集群中一块存储空间的 API 对象。
它是通用的、可插拔的、并且不受单个 Pod 生命周期约束的持久化资源。

aka:
tags:
Expand All @@ -18,7 +17,7 @@ id: persistent-volume
date: 2018-04-12
full_link: /docs/concepts/storage/persistent-volumes/
short_description: >
An API object that represents a piece of storage in the cluster. Available as a general, pluggable resource that persists beyond the lifecycle of any individual Pod.
An API object that represents a piece of storage in the cluster.

aka:
tags:
Expand All @@ -27,10 +26,14 @@ tags:
-->

<!--
An API object that represents a piece of storage in the cluster. Available as a general, pluggable resource that persists beyond the lifecycle of any individual {{< glossary_tooltip text="Pod" term_id="pod" >}}.
An API object that represents a piece of storage in the cluster. Representation of as a general, pluggable storage
{{< glossary_tooltip text="resource" term_id="infrastructure-resource" >}} that can persist beyond the lifecycle of any
individual {{< glossary_tooltip text="Pod" term_id="pod" >}}.
-->
持久卷是代表集群中一块存储空间的 API 对象。它是通用的、可插拔的、并且不受单个
{{< glossary_tooltip text="Pod" term_id="pod" >}} 生命周期约束的持久化资源。
持久卷是代表集群中一块存储空间的 API 对象。
表示为一般的、可插拔的存储{{< glossary_tooltip text="资源" term_id="infrastructure-resource" >}},
它可以超越任何单独的 {{< glossary_tooltip text="Pod" term_id="pod" >}}
的生命周期而存在。

<!--more-->

Expand All @@ -39,6 +42,6 @@ PersistentVolumes (PVs) provide an API that abstracts details of how storage is
PVs are used directly in scenarios where storage can be created ahead of time (static provisioning).
For scenarios that require on-demand storage (dynamic provisioning), PersistentVolumeClaims (PVCs) are used instead.
-->
持久卷(PersistentVolumes,PV)提供了一个 API,该 API 对存储的供应方式细节进行抽象,令其与使用方式相分离。
在提前创建存储(静态供应)的场景中,PV 可以直接使用。
在按需提供存储(动态供应)的场景中,需要使用 PersistentVolumeClaims (PVC)
持久卷(PersistentVolumes,PV)提供了一个 API,该 API 对存储的供应方式细节进行抽象,
令其与使用方式相分离。在提前创建存储(静态制备)的场景中,PV 可以直接使用。
在按需提供存储(动态制备)的场景中,需要使用 PersistentVolumeClaim(PVC
27 changes: 9 additions & 18 deletions content/zh-cn/docs/reference/glossary/pod-security-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,37 @@ id: pod-security-policy
date: 2018-04-12
full_link: /zh-cn/docs/concepts/security/pod-security-policy/
short_description: >
Pod 的创建和更新操作启用细粒度的授权
移除了强制执行 Pod 安全限制的 API

aka:
tags:
- core-object
- fundamental
- security
---
<!--
title: Pod Security Policy
id: pod-security-policy
date: 2018-04-12
full_link: /docs/concepts/security/pod-security-policy/
short_description: >
Enables fine-grained authorization of pod creation and updates.
Removed API that enforced Pod security restrictions.

aka:
tags:
- core-object
- fundamental
- security
-->

<!--
Enables fine-grained authorization of {{< glossary_tooltip term_id="pod" >}} creation and updates.
A former Kubernetes API that enforced security restrictions during {{< glossary_tooltip term_id="pod" >}} creation and updates.
-->

为 {{< glossary_tooltip text="Pod" term_id="pod" >}} 的创建和更新操作启用细粒度的授权
以前的 Kubernetes API,在 {{< glossary_tooltip text="Pod" term_id="pod" >}}
创建和更新期间强制执行安全限制

<!--more-->

<!--
A cluster-level resource that controls security sensitive aspects of the Pod specification. The `PodSecurityPolicy` objects define a set of conditions that a Pod must run with in order to be accepted into the system, as well as defaults for the related fields. Pod Security Policy control is implemented as an optional admission controller.
-->

Pod 安全策略是集群级别的资源,它控制着 Pod 规约中的安全性敏感的内容。
`PodSecurityPolicy` 对象定义了一组条件以及相关字段的默认值,Pod
运行时必须满足这些条件。Pod 安全策略控制实现上体现为一个可选的准入控制器。

<!--
PodSecurityPolicy was deprecated as of Kubernetes v1.21, and removed in v1.25.
As an alternative, use [Pod Security Admission](/docs/concepts/security/pod-security-admission/), or a 3rd party admission plugin.
-->
PodSecurityPolicy 已于 Kubernetes v1.21 起弃用,并在 v1.25 中删除。
作为替代方案,请使用 [Pod 安全准入](/zh-cn/docs/concepts/security/pod-security-admission/)或第三方准入插件。
作为替代方案,请使用
[Pod 安全准入](/zh-cn/docs/concepts/security/pod-security-admission/)或第三方准入插件。
30 changes: 22 additions & 8 deletions content/zh-cn/docs/reference/node/kernel-version-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,34 @@ In runc document, Kernel older than 5.2 is not recommended due to lack of freeze
-->
## v2 控制组 {#version2-control-groups}

Kubernetes 对 cgroup v1 的支持从 v1.31 开始处于维护模式;推荐使用 cgroup v2。
Kubernetes 对 CGroup v1 的支持从 v1.31 开始处于维护模式;推荐使用 CGroup v2。
在 [Linux 5.8](https://github.com/torvalds/linux/commit/4a7e89c5ec0238017a757131eb9ab8dc111f961c)
中,为了方便使用,系统层面的 `cpu.stat` 文件被添加到根 cgroup
中,为了方便使用,系统层面的 `cpu.stat` 文件被添加到根 CGroup

在 runc 文档中,不推荐使用低于 5.2 的内核,因为其缺少冻结特性。

<!--
## Pressure Stall Information (PSI) {#requirements-psi}

[Pressure Stall Information](/docs/reference/instrumentation/node-metrics#psi) is supported in Linux kernel versions 4.20 and up.
[Pressure Stall Information](/docs/reference/instrumentation/understand-psi-metrics/) is supported in Linux kernel versions 4.20 and up,
but requires the following configuration:
-->
## 压力阻塞信息(PSI){#requirements-psi}

Linux 内核 v4.20 及更高版本支持[压力阻塞信息](/zh-cn/docs/reference/instrumentation/node-metrics#psi)。
Linux 内核 v4.20 及更高版本支持[压力阻塞信息](/zh-cn/docs/reference/instrumentation/node-metrics#psi),
但需要以下配置:

<!--
- The kernel must be compiled with the `CONFIG_PSI=y` option.
Most modern distributions enable this by default.
You can check your kernel's configuration by running `zgrep CONFIG_PSI /proc/config.gz`.
- Some Linux distributions may compile PSI into the kernel but disable it by default.
If so, you need to enable it at boot time by adding the `psi=1` parameter to the kernel command line.
-->
- 内核必须使用 `CONFIG_PSI=y` 选项进行编译(大多数现代发行版默认启用此选项)。
你可以通过运行 `zgrep CONFIG_PSI /proc/config.gz` 来检查内核的配置。
- 某些 Linux 发行版可能会将 PSI 编译进内核,但默认情况下是禁用的。
如果是这样,你需要在启动时通过向内核命令行添加 `psi=1` 参数来启用它。

<!--
## Other kernel requirements {#requirements-other}
Expand Down Expand Up @@ -168,9 +182,9 @@ in the _Longterm_ category.

你可以在 [kernel.org](https://www.kernel.org/category/releases.html) 找到活动的内核版本。

通常会提供多个 __长期维护__ 内核版本,用于将 Bug 修复反向移植到较旧的内核树。
通常会提供多个**长期维护**内核版本,用于将 Bug 修复反向移植到较旧的内核树。
特别是对于较旧的树,只有重要的 Bug 修复才会被应用到此类内核,这些内核通常不会频繁发布新版本。
请参阅 Linux 内核网站,了解 _Longterm_ 类别中的[发布列表](https://www.kernel.org/category/releases.html)。
请参阅 Linux 内核网站,了解 **Longterm** 类别中的[发布列表](https://www.kernel.org/category/releases.html)。

## {{% heading "whatsnext" %}}

Expand All @@ -179,6 +193,6 @@ in the _Longterm_ category.
- Allow running kube-proxy with in [nftables mode](/docs/reference/networking/virtual-ips/#proxy-mode-nftables).
- Read more information in [cgroups v2](/docs/concepts/architecture/cgroups/).
-->
- 查阅 [sysctls](/zh-cn/docs/tasks/administer-cluster/sysctl-cluster/) 以获取更多细节。
- 查阅 [sysctl](/zh-cn/docs/tasks/administer-cluster/sysctl-cluster/) 以获取更多细节。
- 允许在 [nftables 模式](/zh-cn/docs/reference/networking/virtual-ips/#proxy-mode-nftables)下运行 kube-proxy。
- 参阅 [cgroups v2](/zh-cn/docs/concepts/architecture/cgroups/)。
- 参阅 [CGroup v2](/zh-cn/docs/concepts/architecture/cgroups/)。