I am using kubernetes 1.8

On 02-Feb-2018 12:51, "'Ahmet Alp Balkan' via Kubernetes user discussion
and Q&A" <kubernetes-users@googlegroups.com> wrote:

> I can't reproduce your problem./ I see the KUBE_CONFIG_1 and _2 just fine
> when I deploy this pod.
>
> I just created configmap:
>
>     kubectl create configmap test-configmap --from-literal=data-1=foo
> --from-literal=data-2=bar
>
> If you're seeing a crashloopbackoff, it probably doesn't have anything to
> do with "command".
>
> Do "kubectl describe -f FILE.yaml" to see why it's crashing. It probably
> can't find the configmap or one of its keys.
>
> On Thu, Feb 1, 2018 at 10:46 PM, <ramueswari...@gmail.com> wrote:
>
>> 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&A" 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.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/kubernetes-users/AMS4BxNsrfc/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" 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.

Reply via email to