-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Add configurable backend service port for Ingress #10283
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
base: master
Are you sure you want to change the base?
Conversation
|
|
|
Welcome @phuc-ppt! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: phuc-ppt The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test all |
|
@phuc-ppt: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
I’m using NGINX Ingress with an AWS Network Load Balancer (NLB), where SSL termination is handled by AWS Certificate Manager (ACM). The NLB terminates HTTPS traffic and forwards plain HTTP to the NGINX Ingress controller. From there, NGINX routes traffic to Kong Gateway, which acts as a reverse proxy to backend services — in this case, the Kubernetes Dashboard.
Problem:
The Kubernetes Dashboard service listens on port 443 (HTTPS) when TLS is enabled. However, in my setup, I want to disable TLS on the dashboard itself while still having Kong connect to it over port 443. The issue arises because the default Kong Helm chart determines the upstream port using the following logic:
Since app.ingress.tls.enabled is false (TLS is terminated at the NLB, not within the cluster), the chart defaults to port 80. But the backend service (Kubernetes Dashboard) does not expose port 80, leading to HTTP 503 errors when Kong tries to route requests.
Fix:
To resolve the issue, I manually modified the Helm chart template to hardcode the default backend port to 443, ensuring Kong would correctly route traffic to the dashboard even with TLS disabled.
Suggestion:
It would be useful if the Helm chart provided an option to explicitly set the backend service port (e.g., defaultBackendPort), decoupled from the TLS configuration, to avoid relying on template hacks or misusing the TLS flag.