The description 
in https://v1-8.docs.kubernetes.io/docs/api-reference/v1.8/#container-v1-core 
might help: " Exposing a port here gives the system additional information 
about the network connections a container uses, but is primarily 
informational. Not specifying a port here DOES NOT prevent that port from 
being exposed. Any port which is listening on the default "0.0.0.0" address 
inside a container will be accessible from the network."



On Tuesday, February 13, 2018 at 1:51:46 PM UTC-5, adoyt wrote:
>
> Hi,
>
> In my yaml file below, 8080 doesn't work because nginx is configured to 
> listen on port 80.  Also, doing a curl against the IP of POD works (curl 
> http://podid:80).  So what's the point of containerPorts?
>
> apiVersion: v1
> kind: Pod
> metadata:
>   name: hello-pod
>   namespace: default
> spec:
>   containers:
>   - name: hello-ctr
>     image: nginx
>     ports:
>     - containerPort: 8080
>
>

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