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
Labels
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
#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 invalues.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.The text was updated successfully, but these errors were encountered: