Created
June 20, 2018 07:22
-
-
Save viktortnk/68479ac6786ef218f9d20a76d7266c6f to your computer and use it in GitHub Desktop.
k8s service example
This file contains 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
# service-example.yml | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: my-service-name | |
namespace: default | |
labels: | |
app: my-service-name | |
env: dev | |
spec: | |
type: LoadBalancer | |
ports: | |
- name: http | |
port: 80 | |
targetPort: service # name or number of target port in your deployment | |
selector: # selector should match labes from your deployment | |
app: my-service-name | |
env: dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment