Charts: [stable/nginx-ingress] force-ssl-redirect error

Created on 30 Jan 2019  路  4Comments  路  Source: helm/charts

Is this a request for help?: YES

I am updating the nginx-ingress to the latest version (1.2.0) and an error is occurring.


Is this a BUG REPORT or FEATURE REQUEST? (choose one):

BUG REPORT

Version of Helm and Kubernetes:

Client: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.2", GitCommit:"cff46ab41ff0bb44d8584413b598ad8360ec1def", GitTreeState:"clean", BuildDate:"2019-01-13T23:15:13Z", GoVersion:"go1.11.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.5-eks-6bad6d", GitCommit:"6bad6d9c768dc0864dab48a11653aa53b5a47043", GitTreeState:"clean", BuildDate:"2018-12-06T23:13:14Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}

Which chart:

stable/nginx-ingress 1.2.0

What happened:

grafana, kubernetes-dashboard, any other charts has a redirect error.

ERR_TOO_MANY_REDIRECTS

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

install stable/nginx-ingress 1.2.0 (with eks or kops, with aws acm)

controller:
  replicaCount: 3
  # autoscaling:
  #   enabled: true
  service:
    annotations:
      service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:ap-northeast-2:759870000000:certificate/0ed1efbf-e305-461d-9b0b-xxxxxxx"
      service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https"
      service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
      service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "3600"

install stable/grafana latest and force-ssl-redirect is true

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"

Anything else we need to know:

now, we reinstall stable/grafana with force-ssl-redirect is false

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
  #  nginx.ingress.kubernetes.io/force-ssl-redirect: "true"

Most helpful comment

If it is the same issue that I encountered you need to add:

  controller:
    config:
      use-forwarded-headers: "true"

in order to allow the X-Forwarded-Proto to get passed as they disabled it by default now.

Relevant link: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#use-forwarded-headers

All 4 comments

If it is the same issue that I encountered you need to add:

  controller:
    config:
      use-forwarded-headers: "true"

in order to allow the X-Forwarded-Proto to get passed as they disabled it by default now.

Relevant link: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#use-forwarded-headers

@MMartyn Thank you. It's working.

Note: Here is the example config for ELB in AWS https://github.com/kubernetes/ingress-nginx/blob/master/deploy/provider/aws/patch-configmap-l7.yaml. I ended up adding the proxy-real-ip-cidr set with the VPC cidr

@MMartyn I was working on this a whole week and couldn't solve it.
It worked perfectly.
Neeed to thank you!

Was this page helpful?
0 / 5 - 0 ratings