mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 06:45:50 +00:00
Create service.yaml
This commit is contained in:
parent
58d6105e77
commit
b7b5ca185b
1 changed files with 17 additions and 0 deletions
17
k8s/service.yaml
Normal file
17
k8s/service.yaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: petclinic-service
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
app: petclinic
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
# By default and for convenience, the `targetPort` is set to
|
||||||
|
# the same value as the `port` field.
|
||||||
|
targetPort: 8080
|
||||||
|
# Optional field
|
||||||
|
# By default and for convenience, the Kubernetes control plane
|
||||||
|
# will allocate a port from a range (default: 30000-32767)
|
||||||
|
nodePort: 30007
|
Loading…
Reference in a new issue