Skip to content

Commit 6b25f92

Browse files
committed
[zh] Rersync securing a cluster
This PR also fixes an English link in the admission controllers page, which doesn't deserve a separate PR.
1 parent d8dfd81 commit 6b25f92

File tree

2 files changed

+40
-14
lines changed

2 files changed

+40
-14
lines changed

content/zh/docs/reference/access-authn-authz/admission-controllers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ This admission controller will deny any Pod that attempts to set certain escalat
13331333
fields, as shown in the
13341334
[Configure a Security Context for a Pod or Container](/docs/tasks/configure-pod-container/security-context/)
13351335
task.
1336-
If you don't use [Pod Security admission]((/docs/concepts/security/pod-security-admission/),
1336+
If you don't use [Pod Security admission](/docs/concepts/security/pod-security-admission/),
13371337
[PodSecurityPolicies](/docs/concepts/security/pod-security-policy/), nor any external enforcement mechanism,
13381338
then you could use this admission controller to restrict the set of values a security context can take.
13391339

content/zh/docs/tasks/administer-cluster/securing-a-cluster.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 保护集群安全
2+
title: 保护集群
33
content_type: task
44
---
55
<!--
@@ -104,10 +104,11 @@ Kubernetes 提供了一组可直接使用的角色,这些角色根据客户可
104104
<!--
105105
As with authentication, simple and broad roles may be appropriate for smaller clusters, but as
106106
more users interact with the cluster, it may become necessary to separate teams into separate
107-
namespaces with more limited roles.
107+
{{< glossary_tooltip text="namespaces" term_id="namespace" >}} with more limited roles.
108108
-->
109109
与身份验证一样,简单而广泛的角色可能适合于较小的集群,但是随着更多的用户与集群交互,
110-
可能需要将团队划分到有更多角色限制的、单独的名字空间中去。
110+
可能需要将团队划分到有更多角色限制的、
111+
单独的{{< glossary_tooltip text="名字空间" term_id="namespace" >}}中去。
111112

112113
<!--
113114
With authorization, it is important to understand how updates on one object may cause actions in
@@ -188,30 +189,37 @@ reserved resources like memory, or to provide default limits when none are speci
188189
A pod definition contains a [security context](/docs/tasks/configure-pod-container/security-context/)
189190
that allows it to request access to run as a specific Linux user on a node (like root),
190191
access to run privileged or access the host network, and other controls that would otherwise
191-
allow it to run unfettered on a hosting node. [Pod security policies](/docs/concepts/policy/pod-security-policy/)
192-
can limit which users or service accounts can provide dangerous security context settings. For example, pod security policies can limit volume mounts, especially `hostPath`, which are aspects of a pod that should be controlled.
192+
allow it to run unfettered on a hosting node.
193+
194+
You can configure [Pod security admission](/docs/concepts/security/pod-security-admission/)
195+
to enforce use of a particular [Pod Security Standard](/docs/concepts/security/pod-security-standards/)
196+
in a {{< glossary_tooltip text="namespace" term_id="namespace" >}}, or to detect breaches.
193197
-->
194198
### 控制容器运行的特权
195199

196200
Pod 定义包含了一个[安全上下文](/zh/docs/tasks/configure-pod-container/security-context/)
197201
用于描述一些访问请求,如以某个节点上的特定 Linux 用户(如 root)身份运行,
198202
以特权形式运行,访问主机网络,以及一些在宿主节点上不受约束地运行的其它控制权限等等。
199-
[Pod 安全策略](/zh/docs/concepts/policy/pod-security-policy/)
200-
可以限制哪些用户或服务帐户可以提供危险的安全上下文设置。
201-
例如,Pod 的安全策略可以限制卷挂载,尤其是 `hostpath`,这些都是 Pod 应该被控制的一些方面。
203+
204+
你可以配置 [Pod 安全准入](/zh/docs/concepts/security/pod-security-admission/)来在某个
205+
{{< glossary_tooltip text="名字空间" term_id="namespace" >}}中
206+
强制实施特定的
207+
[Pod 安全标准(Pod Security Standard)](/zh/docs/concepts/security/pod-security-standards/)
208+
或者检查安全上的缺陷。
202209

203210
<!--
204211
Generally, most application workloads need limited access to host resources so they can
205212
successfully run as a root process (uid 0) without access to host information. However,
206213
considering the privileges associated with the root user, you should write application
207214
containers to run as a non-root user. Similarly, administrators who wish to prevent
208-
client applications from escaping their containers should use a restrictive pod security
209-
policy.
215+
client applications from escaping their containers should apply the **Baseline**
216+
or **Restricted** Pod Security Standard.
210217
-->
211218
一般来说,大多数应用程序需要对主机资源的有限制的访问,
212219
这样它们可以在不访问主机信息的情况下,成功地以 root 账号(UID 0)运行。
213220
但是,考虑到与 root 用户相关的特权,在编写应用程序容器时,你应该使用非 root 用户运行。
214-
类似地,希望阻止客户端应用程序从其容器中逃逸的管理员,应该使用限制性较强的 Pod 安全策略。
221+
类似地,希望阻止客户端应用程序从其容器中逃逸的管理员,应该应用 **Baseline**
222+
**Restricted** Pod 安全标准。
215223

216224
<!--
217225
### Restricting network access
@@ -388,7 +396,7 @@ restrict the integration to functioning in a single namespace if possible.
388396
Components that create pods may also be unexpectedly powerful if they can do so inside namespaces
389397
like the `kube-system` namespace, because those pods can gain access to service account secrets
390398
or run with elevated permissions if those service accounts are granted access to permissive
391-
[pod security policies](/docs/concepts/policy/pod-security-policy/).
399+
[PodSecurityPolicies](/docs/concepts/security/pod-security-policy/).
392400
-->
393401
### 在启用第三方集成之前,请先审查它们
394402

@@ -400,9 +408,27 @@ or run with elevated permissions if those service accounts are granted access to
400408

401409
如果执行 Pod 创建操作的组件能够在 `kube-system` 这类名字空间中创建 Pod,
402410
则这类组件也可能获得意外的权限,因为这些 Pod 可以访问服务账户的 Secret,
403-
或者,如果对应服务帐户被授权访问宽松的 [Pod 安全策略](/zh/docs/concepts/policy/pod-security-policy/)
411+
或者,如果对应服务帐户被授权访问宽松的
412+
[PodSecurityPolicy](/zh/docs/concepts/policy/pod-security-policy/)
404413
它们就能以较高的权限运行。
405414

415+
<!--
416+
If you use [Pod Security admission](/docs/concepts/security/pod-security-admission/) and allow
417+
any component to create Pods within a namespace that permits privileged Pods, those Pods may
418+
be able to escape their containers and use this widened access to elevate their privileges.
419+
-->
420+
如果你使用 [Pod 安全准入](/zh/docs/concepts/security/pod-security-admission/)
421+
并且允许任何组件在一个允许执行特权 Pod 的名字空间中创建 Pod,这些 Pod
422+
就可能从所在的容器中逃逸,利用被拓宽的访问权限来实现特权提升。
423+
424+
<!--
425+
You should not allow untrusted components to create Pods in any system namespace (those with
426+
names that start with `kube-`) nor in any namespace where that access grant allows the possibility
427+
of privilege escalation.
428+
-->
429+
你不应该允许不可信的组件在任何系统名字空间(名字以 `kube-` 开头)中创建 Pod,
430+
也不允许它们在访问权限授权可被利用来提升特权的名字空间中创建 Pod。
431+
406432
<!--
407433
### Encrypt secrets at rest
408434

0 commit comments

Comments
 (0)