Skip to content

Commit 6411e35

Browse files
committed
[zh]Sync /tutorials/security/cluster-level-pss.md
1 parent 80f37e6 commit 6411e35

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

content/zh-cn/docs/tutorials/security/cluster-level-pss.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,24 @@ created. This tutorial shows you how to enforce the `baseline` Pod Security
2424
Standard at the cluster level which applies a standard configuration
2525
to all namespaces in a cluster.
2626
27-
To apply Pod Security Standards to specific namespaces, refer to [Apply Pod Security Standards at the namespace level](/docs/tutorials/security/ns-level-pss).
27+
To apply Pod Security Standards to specific namespaces, refer to
28+
[Apply Pod Security Standards at the namespace level](/docs/tutorials/security/ns-level-pss).
2829
2930
If you are running a version of Kubernetes other than v{{< skew currentVersion >}},
3031
check the documentation for that version.
3132
-->
3233
Pod 安全准入(PSA)在 v1.23 及更高版本默认启用,
33-
因为它[升级到测试版(beta)](/blog/2021/12/09/pod-security-admission-beta/)
34+
因为它已[进阶为 Beta](/blog/2021/12/09/pod-security-admission-beta/)
3435
Pod 安全准入是在创建 Pod 时应用
3536
[Pod 安全标准](/zh-cn/docs/concepts/security/pod-security-standards/)的准入控制器。
3637
本教程将向你展示如何在集群级别实施 `baseline` Pod 安全标准,
37-
该标准将标准配置应用于集群中的所有名称空间
38+
该标准将标准配置应用于集群中的所有名字空间
3839

3940
要将 Pod 安全标准应用于特定名字空间,
4041
请参阅[在名字空间级别应用 Pod 安全标准](/zh-cn/docs/tutorials/security/ns-level-pss)
4142

4243
如果你正在运行 v{{< skew currentVersion >}} 以外的 Kubernetes 版本,
43-
检查该版本的文档
44+
请查阅该版本的文档
4445

4546
## {{% heading "prerequisites" %}}
4647
<!--
@@ -52,7 +53,7 @@ Install the following on your workstation:
5253
在你的工作站中安装以下内容:
5354

5455
- [KinD](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
55-
- [kubectl](https://kubernetes.io/docs/tasks/tools/)
56+
- [kubectl](/zh-cn/docs/tasks/tools/)
5657

5758
<!--
5859
## Choose the right Pod Security Standard to apply
@@ -68,7 +69,7 @@ that are most appropriate for your configuration, do the following:
6869

6970
[Pod 安全准入](/zh-cn/docs/concepts/security/pod-security-admission/)
7071
允许你使用以下模式应用内置的
71-
[Pod 安全标准](/zh-cn/docs/concepts/security/pod-security-standards/):
72+
[Pod 安全标准](/zh-cn/docs/concepts/security/pod-security-standards/)
7273
`enforce``audit``warn`
7374

7475
要收集信息以便选择最适合你的配置的 Pod 安全标准,请执行以下操作:
@@ -174,7 +175,7 @@ that are most appropriate for your configuration, do the following:
174175
Warning: kube-proxy-m6hwf: host namespaces, hostPath volumes, privileged
175176
namespace/kube-system labeled
176177
namespace/local-path-storage labeled
177-
```
178+
```
178179

179180
3. Restricted
180181
```shell
@@ -264,7 +265,7 @@ following:
264265
plugins:
265266
- name: PodSecurity
266267
configuration:
267-
apiVersion: pod-security.admission.config.k8s.io/v1beta1
268+
apiVersion: pod-security.admission.config.k8s.io/v1
268269
kind: PodSecurityConfiguration
269270
defaults:
270271
enforce: "baseline"
@@ -279,6 +280,16 @@ following:
279280
namespaces: [kube-system]
280281
EOF
281282
```
283+
{{< note >}}
284+
<!--
285+
`pod-security.admission.config.k8s.io/v1` configuration requires v1.25+.
286+
For v1.23 and v1.24, use [v1beta1](https://v1-24.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
287+
For v1.22, use [v1alpha1](https://v1-22.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
288+
-->
289+
`pod-security.admission.config.k8s.io/v1` 配置需要 v1.25+。
290+
对于 v1.23 和 v1.24,使用 [v1beta1](https://v1-24.docs.kubernetes.io/zh-cn/docs/tasks/configure-pod-container/enforce-standards-admission-controller/)。
291+
对于 v1.22,使用 [v1alpha1](https://v1-22.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/)。
292+
{{< /note >}}
282293
283294
<!--
284295
1. Configure the API server to consume this file during cluster creation:

content/zh-cn/examples/security/kind-with-cluster-level-baseline-pod-security.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ kind: AdmissionConfiguration
66
plugins:
77
- name: PodSecurity
88
configuration:
9-
apiVersion: pod-security.admission.config.k8s.io/v1beta1
9+
apiVersion: pod-security.admission.config.k8s.io/v1
1010
kind: PodSecurityConfiguration
1111
defaults:
1212
enforce: "baseline"

0 commit comments

Comments
 (0)