Consolidate YAML files [part-15] (#9380)
This is the last PR for moving the YAML/JSON sample files. There still need some follow up PRs to: - rename the `codenew` shortcode to `code`. - move the examples_test.go to where it really belongs.
This commit is contained in:
@@ -191,10 +191,10 @@ done
|
||||
|
||||
Next, we'll run a simple "Hello AppArmor" pod with the deny-write profile:
|
||||
|
||||
{{< code file="hello-apparmor-pod.yaml" >}}
|
||||
{{< codenew file="pods/security/hello-apparmor.yaml" >}}
|
||||
|
||||
```shell
|
||||
$ kubectl create -f ./hello-apparmor-pod.yaml
|
||||
$ kubectl create -f ./hello-apparmor.yaml
|
||||
```
|
||||
|
||||
If we look at the pod events, we can see that the Pod container was created with the AppArmor
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
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" ]
|
||||
Reference in New Issue
Block a user