Kubernetes service ports

This confused me at first. When looking at a service definition there’s the nodePort, port and targetPort. What they mean is:

  clusterIP: 10.0.53.184
  ports:
  - nodePort: 32670 (what it is on the Nodes)
    port: 8080 (what it is internally, within the cluster)
    protocol: TCP
    targetPort: 8080 (what port it maps to within the container)

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.