Ravi Paragi:
what is importance of port in NodePort ?
apiVersion: v1
kind: Service
metadata:
name: webapp-service
spec:
type: NodePort
ports:
- targetPort: 8080
port: 8080
nodePort: 30080
selector:
name: simple-webapp
R Banerjee:
Nodeport is the port on the node( i.e. the machine where the pod is deployed)
Think of it like the ISP port. When we talk to a machine on the internet, the message goes from our computer( pod’s target port) , to the our home router ( service’s port), to our Internet-Service-Provider’s port( node-port), and then to the outside network