mirror of https://github.com/k3s-io/k3s
17 lines
451 B
YAML
17 lines
451 B
YAML
![]() |
apiVersion: v1
|
||
![]() |
kind: Service
|
||
![]() |
metadata:
|
||
|
name: nginx-example
|
||
|
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
|
||
|
# just like the selector in the replication controller,
|
||
|
# but this time it identifies the set of pods to load balance
|
||
|
# traffic to.
|
||
|
selector:
|
||
|
name: nginx
|