Skip to content

Commit

Permalink
AppArmor documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tallclair committed Aug 31, 2016
1 parent 2262731 commit df2698c
Show file tree
Hide file tree
Showing 4 changed files with 416 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _data/guides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,5 @@ toc:
path: /docs/admin/salt/
- title: Monitoring Node Health
path: /docs/admin/node-problem/
- title: AppArmor
path: /docs/admin/apparmor/
10 changes: 10 additions & 0 deletions docs/admin/apparmor/deny-write.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <tunables/global>

profile k8s-apparmor-example-deny-write flags=(attach_disconnected) {
#include <abstractions/base>

file,

# Deny all file writes.
deny /** w,
}
13 changes: 13 additions & 0 deletions docs/admin/apparmor/hello-apparmor-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Pod
metadata:
name: hello-apparmor
annotations:
# Tell Kubernetes to apply the AppArmor profile "k8s-apparmor-example-deny-write".
# Note that this is ignored if the Kubernetes node is not running version 1.4 or greater.
container.apparmor.security.beta.kubernetes.io/hello: localhost/k8s-apparmor-example-deny-write
spec:
containers:
- name: hello
image: busybox
command: [ "sh", "-c", "echo 'Hello AppArmor!' && sleep 1h" ]
Loading

0 comments on commit df2698c

Please sign in to comment.