You don't have to declare it, but it's better if you do. It serves as declaration of intention, plus allows you to provide a name for the port (can be used in various places) and it's at least hypothetically possible to block non-declared traffic.
On Tue, Jul 18, 2017 at 4:05 AM, Yong Zhang <hiscal2...@gmail.com> wrote: > Hi, all > > This is a stupid question maybe, but seems pod can run very well without > defining container port in deployment yaml. Any ideas? > > -- > 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.