2016-02-11 00:55:31 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: nginx-service
|
|
|
|
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
|
2016-03-18 21:45:11 +00:00
|
|
|
# just like the selector in the deployment,
|
2016-02-11 00:55:31 +00:00
|
|
|
# but this time it identifies the set of pods to load balance
|
|
|
|
# traffic to.
|
|
|
|
selector:
|
|
|
|
app: nginx
|