Skip to content

Commit e5d2145

Browse files
authored
Merge pull request #33146 from my-git9/ns-level-pss2
[zh] Update tutorials/security/ns-level-pss.md
2 parents e53215a + a0fbfe2 commit e5d2145

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

content/zh/docs/tutorials/security/ns-level-pss.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ weight: 10
1616
{{% /alert %}}
1717

1818
<!--
19-
Pod Security admission (PSA) is enabled by default in v1.23 and later, as it [graduated
20-
to beta](/blog/2021/12/09/pod-security-admission-beta/). Pod Security Admission
19+
Pod Security admission (PSA) is enabled by default in v1.23 and later, as it
20+
[graduated to beta](/blog/2021/12/09/pod-security-admission-beta/). Pod Security Admission
2121
is an admission controller that applies
22-
[Pod Security Standards](docs/concepts/security/pod-security-standards/)
22+
[Pod Security Standards](/docs/concepts/security/pod-security-standards/)
2323
when pods are created. In this tutorial, you will enforce the `baseline` Pod Security Standard,
2424
one namespace at a time.
2525
2626
You can also apply Pod Security Standards to multiple namespaces at once at the cluster
27-
level. For instructions, refer to [Apply Pod Security Standards at the cluster level](/docs/tutorials/security/cluster-level-pss).
27+
level. For instructions, refer to
28+
[Apply Pod Security Standards at the cluster level](/docs/tutorials/security/cluster-level-pss).
2829
-->
2930
Pod 安全准入(PSA)在 v1.23 及更高版本默认启用,
3031
因为它[升级到测试版(beta)](/blog/2021/12/09/pod-security-admission-beta/)
@@ -41,12 +42,12 @@ Pod 安全准入是在创建 Pod 时应用
4142
Install the following on your workstation:
4243
4344
- [KinD](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
44-
- [kubectl](https://kubernetes.io/docs/tasks/tools/)
45+
- [kubectl](/docs/tasks/tools/)
4546
-->
4647
在你的工作站中安装以下内容:
4748

4849
- [KinD](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
49-
- [kubectl](https://kubernetes.io/docs/tasks/tools/)
50+
- [kubectl](/zh/docs/tasks/tools/)
5051

5152
<!--
5253
## Create cluster
@@ -104,8 +105,10 @@ Create a new namespace called `example`:
104105
```shell
105106
kubectl create ns example
106107
```
108+
107109
<!-- The output is similar to this: -->
108110
输出类似于:
111+
109112
```
110113
namespace/example created
111114
```
@@ -190,11 +193,14 @@ namespace/example created
190193
1. Apply the pod spec to the cluster in `default` namespace:
191194
-->
192195
3. 将 Pod 规约应用到集群中的 `default` 名字空间中:
193-
```shell
194-
kubectl apply -n default -f /tmp/pss/nginx-pod.yaml
195-
```
196+
197+
```shell
198+
kubectl apply -n default -f /tmp/pss/nginx-pod.yaml
199+
```
200+
196201
<!-- Output is similar to this: -->
197202
输出类似于:
203+
198204
```
199205
pod/nginx created
200206
```
@@ -222,6 +228,7 @@ Run `kind delete cluster -name psa-ns-level` to delete the cluster created.
222228
- Run a
223229
[shell script](/examples/security/kind-with-namespace-level-baseline-pod-security.sh)
224230
to perform all the preceding steps all at once.
231+
225232
1. Create KinD cluster
226233
2. Create new namespace
227234
3. Apply `baseline` Pod Security Standard in `enforce` mode while applying
@@ -232,12 +239,14 @@ Run `kind delete cluster -name psa-ns-level` to delete the cluster created.
232239
- [Apply Pod Security Standards at the cluster level](/docs/tutorials/security/cluster-level-pss/)
233240
-->
234241
- 运行一个 [shell 脚本](/examples/security/kind-with-namespace-level-baseline-pod-security.sh)
235-
一次执行所有前面的步骤。
242+
一次执行所有前面的步骤。
243+
236244
1. 创建 KinD 集群
237245
2. 创建新的名字空间
238246
3. 在 `enforce` 模式下应用 `baseline` Pod 安全标准,
239247
同时在 `warn``audit` 模式下应用 `restricted` Pod 安全标准。
240248
4. 创建一个应用以下 Pod 安全标准的新 Pod
249+
241250
- [Pod 安全准入](/zh/docs/concepts/security/pod-security-admission/)
242251
- [Pod 安全标准](/zh/docs/concepts/security/pod-security-standards/)
243252
- [在集群级别应用 Pod 安全标准](/zh/docs/tutorials/security/cluster-level-pss/)

0 commit comments

Comments
 (0)