Skip to content

Instantly share code, notes, and snippets.

@matthewpalmer
Created July 22, 2018 01:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save matthewpalmer/9d9180c4980befe6b06babe98577eab9 to your computer and use it in GitHub Desktop.
Save matthewpalmer/9d9180c4980befe6b06babe98577eab9 to your computer and use it in GitHub Desktop.
overview of kubernetes port definitions
kind: Service
apiVersion: v1
metadata:
name: port-example-svc
spec:
# Make the service externally visible via the node
type: NodePort
ports:
# Which port on the node is the service available through?
- nodePort: 31234
# Inside the cluster, what port does the service expose?
- port: 8080
# Which port do pods selected by this service expose?
- targetPort:
selector:
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment