k3s/docs/user-guide/configmap/command-pod.yaml

22 lines
549 B
YAML
Raw Normal View History

2016-01-18 05:46:26 +00:00
apiVersion: v1
kind: Pod
metadata:
name: config-cmd-test-pod
spec:
containers:
- name: test-container
image: gcr.io/google_containers/busybox
command: [ "/bin/sh", "-c", "echo $(KUBE_CONFIG_1) $(KUBE_CONFIG_2)" ]
env:
- name: KUBE_CONFIG_1
valueFrom:
configMapKeyRef:
name: test-configmap
key: data-1
- name: KUBE_CONFIG_2
valueFrom:
configMapKeyRef:
name: test-configmap
key: data-2
restartPolicy: Never