Merge pull request #45579 from aroradaman/named-port-services-without-selectors

recommend usage of named port for services without selectors
pull/45911/head
Kubernetes Prow Robot 2024-04-17 22:38:29 -07:00 committed by GitHub
commit 25ce93d252
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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