-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExternalName type service cannot be created if without spec.ports
.
#34394
Comments
this should be some validation error. |
@mdshuai @derekwaynecarr @therc |
This is working . { |
@thaniyarasu No. My means is that ExternalName type service cannot be created if without You can refer to the docs about externalname type service: https://github.com/kubernetes/kubernetes.github.io/blob/release-1.4/docs/user-guide/services/index.md |
@thaniyarasu ExternalName type service should be created successful without |
@chengzhang1016 I opened a PR #34789 to create ExternalName service through kubectl, you may want to take a look. |
@hodovska Verified. Thanks for your fixing. |
Automatic merge from submit-queue API v1: do not require ports for all types of services Ports values had to be specified for all types of services but object with service type "ExternalName" does't define ports. That's why we had to remove required condition. Presence of ports in service types where ports are actually required is verified here: https://github.com/kubernetes/kubernetes/blob/master/pkg/api/validation/validation.go#L2439 For more information about ExternalName services see: http://kubernetes.io/docs/user-guide/services/#services-without-selectors Fixes kubernetes/kubernetes#34394
What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): external service
Kubernetes version (use
kubectl version
):v1.5.0-alpha.0.2084+162d80eced3989
What happened:
ExternalName type service cannot be created if without
spec.ports
.How to reproduce it (as minimally and precisely as possible):
Create a ExternalName type service:
kubectl create -f ExternalName type service
Actual results:
ExternalName type service created failed.
Expected results:
Service should be created successful.
Anything else do we need to know:
You can refer to the docs about externalname type service: https://github.com/kubernetes/kubernetes.github.io/blob/release-1.4/docs/user-guide/services/index.md
The docs indicated that
An ExternalName service is a special case of service that does not have selectors. It does not define any ports or endpoints. Rather, it serves as a way to return an alias to an external service residing outside the cluster.
The text was updated successfully, but these errors were encountered: