Report this

What is the reason for this report?

How to Configure Ingress Controller Forwarding Rules

Posted on February 8, 2022

Hi, I’d like to configure my forwarding rules for a Load Balancer I have set up through the Ingress Controller in my Kubernetes Cluster.

As I understand it, editing this manually is a bad idea since these objects may be recreated for whatever reason.

What is the recommended way to edit a forwarding rule given this scenario?

Specifically, I’d like to specify the certificate to use for my HTTPS and point it to the HTTP node port

Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya, @gcpfranticfanficgmailcom

The normal way to do what you want is: keep the Service that fronts the controller as a LoadBalancer on port 80/443, then control HTTPS + cert + backend mapping via the Ingress resource.

For the certificate, reference a Kubernetes TLS secret in your Ingress (spec.tls), or if you’re using cert-manager, let it create/manage that secret and just reference it. For “HTTPS -> HTTP node port”, that’s effectively “terminate TLS at the ingress controller, then proxy to HTTP upstreams”, which is the standard behaviour: your Ingress listens on 443, terminates TLS, and forwards to the Service/port you define (usually port 80 in-cluster), not to a nodePort directly.

If you share which ingress controller you installed (DO’s NGINX Ingress, ingress-nginx, Traefik, etc.), I can paste a minimal Ingress YAML that sets the TLS secret and routes 443 to your HTTP service cleanly.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.