mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 07:15:49 +00:00
Service: Refer to targetPort name.
It's not enough to use the same name for targetPort in pod and port in service. If targetPort field is empty in service, it defaults to the same value as port.
This commit is contained in:
parent
113ca53c02
commit
eca177c09f
2 changed files with 6 additions and 4 deletions
|
@ -8,7 +8,8 @@ metadata:
|
|||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 9094
|
||||
name: http
|
||||
- name: http
|
||||
port: 9094
|
||||
targetPort: http
|
||||
selector:
|
||||
app: spring-petclinic-plain
|
||||
|
|
|
@ -8,7 +8,8 @@ metadata:
|
|||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 9093
|
||||
name: http
|
||||
- name: http
|
||||
port: 9093
|
||||
targetPort: http
|
||||
selector:
|
||||
app: spring-petclinic-plain
|
||||
|
|
Loading…
Reference in a new issue