Hi, I have 1 question regarding pods, I create a pod of nginx using imperarive . . .

vinay kaushik:
Hi,

I have 1 question regarding pods, I create a pod of nginx using imperarive command in the KodeKloudLABS and I did not mention any container port.

kubectl run nginx --image=nginx

I can still access the application via POD ip address from the Node, how this is possible.

kindly help me understanding this, my expectation was that this pod should not be accessible from the Node

Trung Tran:
By default, the NGINX web server listens to all incoming connections on port 80.

Trung Tran:
By default, if no policies exist in a namespace, then all ingress and egress traffic is allowed to and from pods in that namespace.

vinay kaushik:
Thanks that helps