What are you doing with port-forward inside your pod? Binding to 0 is the "normal" way to do things unless you have reason to dO otherwise.
On Fri, Dec 15, 2017 at 4:42 PM, Dietrich Schultz <dietrich.schu...@gmail.com> wrote: > Just started exploring kubernetes, and ran into this. Haven't found any docs > or clear statements of best practice. The only thing I found was this note > in the container.v1 spec describing the port field: > >> Any port which is listening on the default "0.0.0.0" address inside a >> container will be accessible from the network. > > > While interesting, it doesn't quite answer my question. I've found that if > my app binds to pod_ip then I can't use kubectl port-forward. If I bind to > 127.0.0.1 then port-forward works, but I can't connect from other pods. Only > binding to 0.0.0.0 seems to work for both cases. Is this intentional? Is > binding to 0.0.0.0 considered a best practice or is kubectl deficient? Is > this requirement/best practice documented somewhere? > > > -- > 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.