File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
content/en/docs/concepts/security Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,9 @@ controller selects policies according to the following criteria:
214
214
2. If the pod must be defaulted or mutated, the first PodSecurityPolicy
215
215
(ordered by name) to allow the pod is selected.
216
216
217
+ When a Pod is validated against a PodSecurityPolicy, [a `kubernetes.io/psp` annotation](/docs/reference/labels-annotations-taints/#kubernetes-io-psp)
218
+ is added with its name as its value.
219
+
217
220
{{< note >}}
218
221
During update operations (during which mutations to pod specs are disallowed)
219
222
only non-mutating PodSecurityPolicies are used to validate the pod.
@@ -332,7 +335,15 @@ The output is similar to this
332
335
pod "pause" created
333
336
```
334
337
335
- It works as expected! But any attempts to create a privileged pod should still
338
+ It works as expected! You can verify that the pod was validated against the
339
+ newly created PodSecurityPolicy:
340
+
341
+ ```shell
342
+ kubectl-user get pod pause -o yaml | grep kubernetes.io/psp
343
+ kubernetes.io/psp: example
344
+ ```
345
+
346
+ But any attempts to create a privileged pod should still
336
347
be denied:
337
348
338
349
``` shell
You can’t perform that action at this time.
0 commit comments