to communicate between your botkit-dev pods and api pods, read about
kubernetes service. They solve exactly that problem :)

On Mon, Feb 20, 2017 at 8:21 PM, Norman Khine <nor...@khine.net> wrote:
> It is only for internal usage between the two containers.
>
> one more question - what if i have another container but which is in a
> different pod, how would i connect to it without having to go out of the
> ELB, for example, i have a botkit that needs to talk to the API container
> that is in another pod
>
>> apiVersion: extensions/v1beta1
>> kind: Deployment
>> metadata:
>>   name: botkit-dev
>> spec:
>>   replicas: 1
>>   template:
>>     metadata:
>>       labels:
>>         pod: botkit-dev
>>         track: develop
>>     spec:
>>       containers:
>>           name: botkit
>>           ports:
>>             - containerPort: 3003
>>           env:
>>             - name: GRAPHQL_ENDPOINT
>>               value: https://bot/graphql
>
>
> localhost:3000 or 127.0.0.0:3000 is only valid for containers in the same
> pod - but how would you set it so that the botkit-dev pod is able to query
> on of the api end points directly without going out to the ELB?
>
> On 20 February 2017 at 23:08, Rodrigo Campos <rodrig...@gmail.com> wrote:
>>
>> Local host or 127.0.0.1, depends if the service binds to ipv4 only and how
>> your client connects. But if local host doesn't work, try 127.0.0.1 :-)
>>
>>
>> On Monday, February 20, 2017, 'Tim Hockin' via Kubernetes user discussion
>> and Q&A <kubernetes-users@googlegroups.com> wrote:
>>>
>>> 0.0.0.0 is valid as a bind-to address, meaning "any IP", but as a
>>> connect-to address you probably want 'localhost'
>>>
>>> On Mon, Feb 20, 2017 at 2:11 PM, Matthias Rampke <m...@soundcloud.com>
>>> wrote:
>>> > I see three containers in this.
>>> >
>>> > Yes, 0.0.0.0:9999 should work if the graphql container binds to all
>>> > interfaces. Try it out?
>>> >
>>> >
>>> > On Mon, Feb 20, 2017, 21:01 Norman Khine <nor...@khine.net> wrote:
>>> >>
>>> >> Hello, I have the following template file which has 2 containers:
>>> >>
>>> >>
>>> >>       containers:
>>> >>         - name: api
>>> >>           ports:
>>> >>             - containerPort: 3000
>>> >>           env:
>>> >>             - name: SERVERLESS_ENDPOINT
>>> >>               value: http://0.0.0.0:9999
>>> >>         - name: media
>>> >>           ports:
>>> >>             - containerPort: 4000
>>> >>           env:
>>> >>             - name: API
>>> >>               value: http://0.0.0.0:3000
>>> >>         - name: graphql
>>> >>           imagePullPolicy: Always
>>> >>           ports:
>>> >>             - containerPort: 9999
>>> >>
>>> >>
>>> >>
>>> >> is this the correct to use http://0.0.0.0:9999 to access the graphql
>>> >> container from the api?
>>> >>
>>> >> Any advise is much appreciated
>>> >>
>>> >> --
>>> >> 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.
>>>
>>> --
>>> 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/hgXt_yQPxEU/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.
>
>
>
>
> --
> %>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for
> c in ",adym,*)&uzq^zqf" ] )
>
> --
> 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