Created
July 22, 2018 01:27
-
-
Save matthewpalmer/9d9180c4980befe6b06babe98577eab9 to your computer and use it in GitHub Desktop.
overview of kubernetes port definitions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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