I have created config-map and I am using the following yaml file to create a
pod which uses the data as env variables but I am getting crashloopbackoff.
When I remove the " command: [ "/bin/sh", "-c", "env" ]". It is running but i
did not see any env variables in the pod. "echo $KUBE_CONFIG_1". It shows up
blank. Can you please help me resolving this. (MY reqyuirement is to use env
variables in configmap and attach it to the pod).
apiVersion: v1
kind: Pod
metadata:
name: config-env-test-pod
spec:
containers:
- name: test-container
image: gcr.io/google_containers/busybox
command: [ "/bin/sh", "-c", "env" ]
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
--
You received this message because you are subscribed to the Google Groups
"Kubernetes user discussion and Q" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.