@@ -16,15 +16,16 @@ weight: 10
16
16
{{% /alert %}}
17
17
18
18
<!--
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
21
21
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/)
23
23
when pods are created. In this tutorial, you will enforce the `baseline` Pod Security Standard,
24
24
one namespace at a time.
25
25
26
26
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).
28
29
-->
29
30
Pod 安全准入(PSA)在 v1.23 及更高版本默认启用,
30
31
因为它[ 升级到测试版(beta)] ( /blog/2021/12/09/pod-security-admission-beta/ ) 。
@@ -41,12 +42,12 @@ Pod 安全准入是在创建 Pod 时应用
41
42
Install the following on your workstation:
42
43
43
44
- [KinD](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
44
- - [kubectl](https://kubernetes.io /docs/tasks/tools/)
45
+ - [kubectl](/docs/tasks/tools/)
45
46
-->
46
47
在你的工作站中安装以下内容:
47
48
48
49
- [ 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/)
50
51
51
52
<!--
52
53
## Create cluster
@@ -104,8 +105,10 @@ Create a new namespace called `example`:
104
105
``` shell
105
106
kubectl create ns example
106
107
```
108
+
107
109
<!-- The output is similar to this: -->
108
110
输出类似于:
111
+
109
112
```
110
113
namespace/example created
111
114
```
@@ -190,11 +193,14 @@ namespace/example created
190
193
1. Apply the pod spec to the cluster in ` default` namespace:
191
194
-->
192
195
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
+
196
201
< ! -- Output is similar to this: -->
197
202
输出类似于:
203
+
198
204
` ` `
199
205
pod/nginx created
200
206
` ` `
@@ -222,6 +228,7 @@ Run `kind delete cluster -name psa-ns-level` to delete the cluster created.
222
228
- Run a
223
229
[shell script](/examples/security/kind-with-namespace-level-baseline-pod-security.sh)
224
230
to perform all the preceding steps all at once.
231
+
225
232
1. Create KinD cluster
226
233
2. Create new namespace
227
234
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.
232
239
- [Apply Pod Security Standards at the cluster level](/docs/tutorials/security/cluster-level-pss/)
233
240
-->
234
241
- 运行一个 [shell 脚本](/examples/security/kind-with-namespace-level-baseline-pod-security.sh)
235
- 一次执行所有前面的步骤。
242
+ 一次执行所有前面的步骤。
243
+
236
244
1. 创建 KinD 集群
237
245
2. 创建新的名字空间
238
246
3. 在 ` enforce` 模式下应用 ` baseline` Pod 安全标准,
239
247
同时在 ` warn` 和 ` audit` 模式下应用 ` restricted` Pod 安全标准。
240
248
4. 创建一个应用以下 Pod 安全标准的新 Pod
249
+
241
250
- [Pod 安全准入](/zh/docs/concepts/security/pod-security-admission/)
242
251
- [Pod 安全标准](/zh/docs/concepts/security/pod-security-standards/)
243
252
- [在集群级别应用 Pod 安全标准](/zh/docs/tutorials/security/cluster-level-pss/)
0 commit comments