Doubts reg port while creating pod
In Lab 2.3. Create a Basic Pod
We have created basic pod using:
Now, we tried to add
ports: #<--Add this and following
- containerPort: 80
But i was able to curl to the pod Ip and get nginx page before and after. So, would like to know the difference.
Even without adding containerPort, i am able to curl:
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
Thank you for using nginx.
I am new into kubernetes, would be helpful is someone can explain.