I'm setting up DO Load Balancer to access my service using Nginx Ingress Controller (without helm). From DO control panel, I can see my nodes are accepting traffic somehow the page throws me 400 bad request with error The plain HTTP request was sent to HTTPS port
. Can one please point me out my mistake?
I wonder if this has anything to do with my health checks
? The application is exposing an endpoint to update health check 200, but application expose via port 3000 and health check URL is pointing to 80 atm.
Below's the annontation use for my LB.
annotations:
service.beta.kubernetes.io/do-loadbalancer-name: random
service.beta.kubernetes.io/do-loadbalancer-protocol: "http"
service.beta.kubernetes.io/do-loadbalancer-tls-passthrough: "true"
service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443"
service.beta.kubernetes.io/do-loadbalancer-certificate-id: "masked-my-cert-id"
service.beta.kubernetes.io/do-loadbalancer-disable-lets-encrypt-dns-records: "false"
service.beta.kubernetes.io/do-loadbalancer-redirect-http-to-https: "true"
service.beta.kubernetes.io/do-loadbalancer-healthcheck-port: "3000"
service.beta.kubernetes.io/do-loadbalancer-healthcheck-protocol: "http"
service.beta.kubernetes.io/do-loadbalancer-healthcheck-path: "/api/healthcheck"
service.beta.kubernetes.io/do-loadbalancer-healthcheck-check-interval-seconds: "3"
service.beta.kubernetes.io/do-loadbalancer-healthcheck-response-timeout-seconds: "5"
service.beta.kubernetes.io/do-loadbalancer-healthcheck-unhealthy-threshold: "3"
service.beta.kubernetes.io/do-loadbalancer-healthcheck-healthy-threshold: "5"
Screenshot FYR
Resolved my issue. I need to expose port 443 for my
Ingress
. I did this by setting up theTLS
.This is how my final LB setup looks like