Create pod-configmap-env-var-valueFrom.yaml
This commit is contained in:
parent
4c8187b9d6
commit
580fc22cae
|
|
@ -0,0 +1,21 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: dapi-test-pod
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: test-container
|
||||||
|
image: registry.k8s.io/busybox
|
||||||
|
command: [ "/bin/echo", "$(SPECIAL_LEVEL_KEY) $(SPECIAL_TYPE_KEY)" ]
|
||||||
|
env:
|
||||||
|
- name: SPECIAL_LEVEL_KEY
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: special-config
|
||||||
|
key: SPECIAL_LEVEL
|
||||||
|
- name: SPECIAL_TYPE_KEY
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: special-config
|
||||||
|
key: SPECIAL_TYPE
|
||||||
|
restartPolicy: Never
|
||||||
Loading…
Reference in New Issue