Kong aws-load-balancer with http and https over Kubernetes

I’m trying to create aws-load-balancer with HTTP that directs to the same instance port that the HTTPS protocol talks to.

This is my k8s service:

apiVersion: apiextensions.k8s.io/v1
kind: Service
proxy:
  enabled: true
  type: LoadBalancer
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-internal: "true"
    service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*'
    # Note that the backend talks over HTTP.
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
    # Only run SSL on the port named "https" below.
    service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443"
    service.beta.kubernetes.io/aws-load-balancer-ssl-cert: '<cert>'
env:
  trusted_ips: 0.0.0.0/0,::0
  real_ip_recursive: "on"
  real_ip_header: X-Forwarded-For

and I’m getting this:

the desired result is this:

what am I missing here? any suggestion?

Thanks

That Service definition looks a bit odd or incomplete. It’s missing a ports block, a la the example at Service | Kubernetes

That’d normally specify a targetPort indicating the underlying Deployment’s listen port; you would set the targetPort for both the 80 and 443 port to 31552.

I agree with Traines, Instance port is a range of nodePort 30000-32767 you can explicit nodeport or k8s do this for you.