Merge pull request #45579 from aroradaman/named-port-services-without-selectors
recommend usage of named port for services without selectorspull/45911/head
commit
25ce93d252
|
@ -219,7 +219,8 @@ metadata:
|
|||
name: my-service
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 9376
|
||||
```
|
||||
|
@ -241,8 +242,7 @@ metadata:
|
|||
kubernetes.io/service-name: my-service
|
||||
addressType: IPv4
|
||||
ports:
|
||||
- name: '' # empty because port 9376 is not assigned as a well-known
|
||||
# port (by IANA)
|
||||
- name: http # should match with the name of the service port defined above
|
||||
appProtocol: http
|
||||
protocol: TCP
|
||||
port: 9376
|
||||
|
|
Loading…
Reference in New Issue