In general, try not to specify namespace in your resource manifests. That
makes them more portable (i.e. able to create the same resources in
different namespaces that the user chooses at deploy time via kubectl
--namespace flag or similar).

On Wed, 21 Sep 2016 at 10:42 Manoj Khotele <manojkumar.khot...@gmail.com>
wrote:

> Thanks a lot Jimmi. It worked.
>
>
> On Wednesday, September 21, 2016 at 3:01:22 PM UTC+5:30, Jimmi Dyson wrote:
>
>> AFAIK you can't reference config maps across namespaces. Try creating the
>> configmap & deployment in the same namespace, & setting the
>> configMapKeyRef.name to simply the name of the configmap (my-configmap
>> in your example).
>>
>> On Wed, 21 Sep 2016 at 07:54 Manoj Khotele <manojkuma...@gmail.com>
>> wrote:
>>
> Hello Brandon,
>>>
>>> Please find attached the files which I have tried and tested against
>>> k8s-v1.3.4.
>>> Just go on creating namespace, configmap and then deployment.
>>>
>>> Then describe the pod created. You will get this error - Error syncing
>>> pod, skipping: failed to "StartContainer" for "logstash" with
>>> RunContainerError: "GenerateRunContainerOptions: configmaps
>>> \"my-configmap.non-default-namespace\" not found"
>>>
>>> Thanks in advance,
>>> Manoj
>>>
>>> On Wed, Sep 21, 2016 at 10:34 AM, Brandon Philips <brandon...@coreos.com
>>> > wrote:
>>>
>> Please attach or paste in the json/yaml for the configmap and deployment
>>>> so we can help debug.
>>>>
>>>> On Tue, Sep 20, 2016 at 9:50 PM Manoj Khotele <manojkuma...@gmail.com>
>>>> wrote:
>>>>
>>> Hello,
>>>>>
>>>>> I have created a configmap, let's say, named 'my-configmap' in let's
>>>>> say 'non-default-namespace' namespace.
>>>>> I am trying to create a deployment in the same 'non-default-namespace'
>>>>> itself, which refers to the config-map to get the values of env var
>>>>> populated.
>>>>>
>>>>> But I am always getting the error which indicates that k8s could not
>>>>> find the configmap.
>>>>>
>>>>> I tried almost all the combinations for mentioning the name of
>>>>> config-maps for accessing the key-values from deployment file; like:
>>>>> non-default-namespace.my-configmap,
>>>>> my-configmap.non-default-namespace, my-configmap
>>>>>
>>>>> I tried separators other than '.' as well, like '/' and ':'.
>>>>>
>>>>> Please help.
>>>>>
>>>>> I am working with k8s v 1.3.4.
>>>>>
>>>>> Best Regards,
>>>>> Manoj
>>>>>
>>>>> --
>>>>> 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-use...@googlegroups.com.
>>>>> To post to this group, send email to kubernet...@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/cVxRal4WU8k/unsubscribe
>>>> .
>>>>
>>> To unsubscribe from this group and all its topics, send an email to
>>>> kubernetes-use...@googlegroups.com.
>>>>
>>>
>>>> To post to this group, send email to kubernet...@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-use...@googlegroups.com.
>>> To post to this group, send email to kubernet...@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.
>

-- 
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