Hi All,
My get a success response for my API requests made in HTTPS using the OpenShift route URL. But when the same API request is made through external load balancer (Haproxy) > Kong > OpenShift service flow, I get the below error response.
HTTP/1.1 400 Bad Request
400 The plain HTTP request was sent to HTTPS port
Date: Sun, 10 May 2020 09:58:59 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 220
X-Kong-Response-Latency: 0
Server: kong/2.0.2.0-enterprise-k8s400 Bad Request
The plain HTTP request was sent to HTTPS port
My LB (Haproxy) configuration is,
frontend ingress_secure
bind *:443 ssl crt /etc/haproxy/cert/haproxy.pem
mode http
acl has_nsb_uri path_beg /nsb
use_backend kong_secure_backend if has_nsb_uri
default_backend ingress_secure_backendbackend kong_secure_backend
balance roundrobin
mode http
server external-infra1 172.55.49.33:30008 check
server external-infra2 172.55.49.34:30008 check
My Ingress resource configuration is,
[root@server ~]# oc describe ingress httplistener
Name: httplistener
Namespace: nsb-mobile
Address: 172.30.22.2
Default backend: default-http-backend:80 ()
Rules:
Host Path Backends
/nsb/api/service httplistener:8080 (172.28.34.102:8080)Annotations:
konghq.com/https-redirect-status-code: 302
konghq.com/protocols: https
kubectl.kubernetes.io/last-applied-configuration: {“annotations”:{“konghq.com/strip-path":false},“apiVersion”:“extensions/v1beta1”,“kind”:“Ingress”,“metadata”:{“annotations”:{},“name”:“httplistener”},“spec”:{“rules”:[{“http”:{“paths”:[{“backend”:{“serviceName”:“httplistener”,“servicePort”:8080},“path”:"/nsb/api/service”}]}}]}}Events:
Can you help me resolve this issue.
Thanks!