k3s/docs/user-guide/walkthrough/service.yaml

17 lines
440 B
YAML
Raw Normal View History

2015-06-10 20:25:54 +00:00
apiVersion: v1
2014-10-21 05:44:14 +00:00
kind: Service
2015-05-08 00:55:36 +00:00
metadata:
name: nginx-service
2015-05-08 00:55:36 +00:00
spec:
ports:
- port: 8000 # the port that this service should serve on
# the container on each pod to connect to, can be a name
# (e.g. 'www') or a number (e.g. 80)
targetPort: 80
protocol: TCP
2015-05-08 00:55:36 +00:00
# just like the selector in the replication controller,
# but this time it identifies the set of pods to load balance
# traffic to.
selector:
app: nginx