Separate commands from their outputs
parent
23eea7e122
commit
8a4e62fb76
|
@ -287,6 +287,11 @@ pod's service account nor `fake-user` have permission to use the new policy:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl-user auth can-i use podsecuritypolicy/example
|
kubectl-user auth can-i use podsecuritypolicy/example
|
||||||
|
```
|
||||||
|
|
||||||
|
The output is similar to this:
|
||||||
|
|
||||||
|
```
|
||||||
no
|
no
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -303,14 +308,27 @@ kubectl-admin create role psp:unprivileged \
|
||||||
--verb=use \
|
--verb=use \
|
||||||
--resource=podsecuritypolicy \
|
--resource=podsecuritypolicy \
|
||||||
--resource-name=example
|
--resource-name=example
|
||||||
role "psp:unprivileged" created
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
role "psp:unprivileged" created
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
kubectl-admin create rolebinding fake-user:psp:unprivileged \
|
kubectl-admin create rolebinding fake-user:psp:unprivileged \
|
||||||
--role=psp:unprivileged \
|
--role=psp:unprivileged \
|
||||||
--serviceaccount=psp-example:fake-user
|
--serviceaccount=psp-example:fake-user
|
||||||
rolebinding "fake-user:psp:unprivileged" created
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
rolebinding "fake-user:psp:unprivileged" created
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
kubectl-user auth can-i use podsecuritypolicy/example
|
kubectl-user auth can-i use podsecuritypolicy/example
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
yes
|
yes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -340,6 +358,11 @@ newly created PodSecurityPolicy:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl-user get pod pause -o yaml | grep kubernetes.io/psp
|
kubectl-user get pod pause -o yaml | grep kubernetes.io/psp
|
||||||
|
```
|
||||||
|
|
||||||
|
The output is similar to this
|
||||||
|
|
||||||
|
```
|
||||||
kubernetes.io/psp: example
|
kubernetes.io/psp: example
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue