Skip to content

Commit 9ac60ec

Browse files
authored
Update apparmor.md
Due to exec command DEPRECATED. so please add `--` to avoid info message. `Current` ``` root@wk8s-m:~# kubectl exec hello-apparmor cat /proc/1/attr/current kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead. k8s-apparmor-example-deny-write (enforce) ``` ``` root@wk8s-m:~# kubectl exec hello-apparmor touch /tmp/test kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead. touch: /tmp/test: Permission denied command terminated with exit code 1 ``` `Change` ``` root@wk8s-m:~# kubectl exec hello-apparmor -- cat /proc/1/attr/current k8s-apparmor-example-deny-write (enforce) ``` ``` root@wk8s-m:~# kubectl exec hello-apparmor -- touch /tmp/test touch: /tmp/test: Permission denied command terminated with exit code 1 ```
1 parent 53f7612 commit 9ac60ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/en/docs/tutorials/clusters/apparmor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ kubectl get events | grep hello-apparmor
233233
We can verify that the container is actually running with that profile by checking its proc attr:
234234

235235
```shell
236-
kubectl exec hello-apparmor cat /proc/1/attr/current
236+
kubectl exec hello-apparmor -- cat /proc/1/attr/current
237237
```
238238
```
239239
k8s-apparmor-example-deny-write (enforce)
@@ -242,7 +242,7 @@ k8s-apparmor-example-deny-write (enforce)
242242
Finally, we can see what happens if we try to violate the profile by writing to a file:
243243

244244
```shell
245-
kubectl exec hello-apparmor touch /tmp/test
245+
kubectl exec hello-apparmor -- touch /tmp/test
246246
```
247247
```
248248
touch: /tmp/test: Permission denied

0 commit comments

Comments
 (0)