Home > Enterprise >  I want my EKS cluster to listen to https request
I want my EKS cluster to listen to https request

Time:11-17

I use Network load balancer which was provisioned using the yaml file I got here: https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.4/deploy/static/provider/aws/deploy-tls-termination.yaml

I have also pointed my domain to the Network Load balancer created by ingress-nginx.

But whenever I try it to access the site, I get a 502 Bad Gateway error.

Below is a sample of my ingress-nginx resource:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: "true"
    # for backend TLS
    nginx.ingress.kubernetes.io/secure-backends: "true"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
  rules:
    - host: "my.sub.domain.com"
      http:
        paths:
          - pathType: Prefix
            path: /
            backend:
              service:
                name: apigateway
                port:
                  number: 1234

Please what can I do to solve the issue? I have searched the internet for days now. Thank you.

CodePudding user response:

i would suggest try checking out the

The annotation nginx.ingress.kubernetes.io/ssl-passthrough instructs the controller to send TLS connections directly to the backend instead of letting NGINX decrypt the communication.

You should also check out the

nginx.ingress.kubernetes.io/configuration-snippet: |
      proxy_ssl_name "svc-s.default.svc.cluster.local";

Reference doc : https://github.com/kubernetes/ingress-nginx/issues/4928#issuecomment-574331462

Hope your service is running, as Nginx only throws the 502 when there is the issue of backend or upstream service not running.

  • Related