File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
content/en/docs/concepts/security Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,11 @@ pod's service account nor `fake-user` have permission to use the new policy:
287
287
288
288
` ` ` shell
289
289
kubectl-user auth can-i use podsecuritypolicy/example
290
+ ` ` `
291
+
292
+ The output is similar to this :
293
+
294
+ ` ` `
290
295
no
291
296
` ` `
292
297
@@ -303,14 +308,27 @@ kubectl-admin create role psp:unprivileged \
303
308
--verb=use \
304
309
--resource=podsecuritypolicy \
305
310
--resource-name=example
311
+ ` ` `
312
+
313
+ ```
306
314
role "psp: unprivileged " created
315
+ ```
307
316
317
+ ```shell
308
318
kubectl-admin create rolebinding fake-user:psp:unprivileged \
309
319
--role=psp:unprivileged \
310
320
--serviceaccount=psp-example:fake-user
321
+ ```
322
+
323
+ ```
311
324
rolebinding "fake-user:psp:unprivileged" created
325
+ ```
312
326
327
+ ``` shell
313
328
kubectl-user auth can-i use podsecuritypolicy/example
329
+ ```
330
+
331
+ ```
314
332
yes
315
333
```
316
334
@@ -340,6 +358,11 @@ newly created PodSecurityPolicy:
340
358
341
359
``` shell
342
360
kubectl-user get pod pause -o yaml | grep kubernetes.io/psp
361
+ ```
362
+
363
+ The output is similar to this
364
+
365
+ ```
343
366
kubernetes.io/psp: example
344
367
```
345
368
You can’t perform that action at this time.
0 commit comments