-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpod.yaml
48 lines (48 loc) · 1.39 KB
/
pod.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
apiVersion: v1
kind: Pod
metadata:
name: my-suboptimal-pod
# annotations:
# container.apparmor.security.beta.kubernetes.io/my-ubuntu: localhost/my-apparmor-profile
spec:
terminationGracePeriodSeconds: 0
# automountServiceAccountToken: false
# securityContext:
# seccompProfile: # <= uncomment this line
# type: Localhost # <= uncomment this line
# localhostProfile: profiles/my-profile.json # <= uncomment this line
# appArmorProfile: # <= uncomment this line on k8s > v1.31
# type: Localhost # <= uncomment this line on k8s > v1.31
# localhostProfile: my-apparmor-profile # <= uncomment this line on k8s > v1.31
containers:
- name: my-ubuntu
image: ubuntu
args: ["sleep", "1d"]
securityContext:
readOnlyRootFilesystem: false
privileged: true
allowPrivilegeEscalation: true
runAsUser: 0 # 65534
runAsNonRoot: false
# resources:
# requests:
# cpu: "0.5"
# memory: "256Mi"
# limits:
# cpu: "0.5"
# memory: "256Mi"
volumeMounts:
- name: host
mountPath: /host/
# readOnly: true
# - name: secret-data
# mountPath: /secret/
# readOnly: true
volumes:
- name: host
hostPath:
path: /
type: Directory
# - name: secret-data
# secret:
# secretName: my-secret