Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/coredns] Failure if serviceType is "LoadBalancer" #22578

Closed
stuartpb opened this issue May 28, 2020 · 2 comments
Closed

[stable/coredns] Failure if serviceType is "LoadBalancer" #22578

stuartpb opened this issue May 28, 2020 · 2 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@stuartpb
Copy link

stuartpb commented May 28, 2020

#12976 added TCP to the default ports used by the CoreDNS service. However, Kubernetes does not allow LoadBalancer services to expose mixed-protocol ports (see kubernetes/kubernetes#23880 et al), so if you specify LoadBalancer as the service type, this is what happens with the chart as is:

Release "example" failed and has been uninstalled: Service "example-coredns" is invalid: spec.ports: Invalid value: []core.ServicePort{core.ServicePort{Name:"udp-53", Protocol:"UDP", Port:53, TargetPort:intstr.IntOrString{Type:0, IntVal:53, StrVal:""}, NodePort:0}, core.ServicePort{Name:"tcp-53", Protocol:"TCP", Port:53, TargetPort:intstr.IntOrString{Type:0, IntVal:53, StrVal:""}, NodePort:0}}: cannot create an external load balancer with mix protocols

There's been an enhancement proposal to fix this on Kubernetes's end since January, but the last comment on the PR was 20 days ago. It doesn't look like the fix for this will be making it to kubelet any time soon.

Suggested solution

Until Kubernetes can agree on a fix, the best solution, as I see it, would be for the chart to split the TCP ports into a separate service when the type is LoadBalancer, with an additional field in values.yaml to specify annotations for the Service(s) and a note that you may have to add an annotation for your LoadBalancer implementation to allow this.

@stale
Copy link

stale bot commented Jun 28, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 28, 2020
@stale
Copy link

stale bot commented Jul 12, 2020

This issue is being automatically closed due to inactivity.

@stale stale bot closed this as completed Jul 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

1 participant