-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathprojected.yaml
41 lines (41 loc) · 1.19 KB
/
projected.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
---
# https://kubernetes.io/docs/concepts/storage/volumes/#example-pod-with-a-secret-a-downward-api-and-a-configmap
apiVersion: v1
kind: Pod
metadata:
name: volumes-projected-pod
spec:
containers:
- command:
- sleep
- "3600"
image: busybox
name: volumes-projected-container
volumeMounts:
- name: volumes-projected-volume-mount
mountPath: "/volumes-projected-volume-path"
readOnly: true
volumes:
- name: volumes-projected-volume-mount
projected:
sources:
- secret:
items:
- key: username
path: my-group/my-username
mode: 511
name: volumes-projected-secret
- downwardAPI:
items:
- path: "labels"
fieldRef:
fieldPath: metadata.labels
- path: "cpu_limit"
resourceFieldRef:
containerName: container-test
resource: limits.cpu
- configMap:
items:
- key: config
path: my-group/my-config
name: volumes-projected-configmap