Skip to content

Commit 70ede28

Browse files
authored
Update the configuration location of appArmorProfile
For Kubernetes versions 1.30 and above, the location of appArmorProfile configuration is under securityContext
1 parent 052ff22 commit 70ede28

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/zh-cn/examples/pods/security/hello-apparmor.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ apiVersion: v1
22
kind: Pod
33
metadata:
44
name: hello-apparmor
5-
annotations:
6-
# 告知 Kubernetes 去应用 AppArmor 配置 "k8s-apparmor-example-deny-write"。
7-
# 请注意,如果节点上运行的 Kubernetes 不是 1.4 或更高版本,此注解将被忽略。
8-
container.apparmor.security.beta.kubernetes.io/hello: localhost/k8s-apparmor-example-deny-write
95
spec:
6+
securityContext:
7+
appArmorProfile:
8+
type: Localhost
9+
localhostProfile: k8s-apparmor-example-deny-write
1010
containers:
1111
- name: hello
1212
image: busybox:1.28

0 commit comments

Comments
 (0)