Disable SSL redirect for Kubernetes NGINX ingress

0 votes

An SSL redirect is enabled by default in a Kubernetes NGINX ingress. How can this be disabled? Current implementation below:

apiVersion: extensions/v1beta1

kind: Ingress

metadata:

  name: project_name-ingress

  annotations:

    nginx.ingress.kubernetes.io/rewrite-target: /

spec:

  rules:

  - http:

      paths:

      - path: /

        backend:

          serviceName: project_name

          servicePort: 80
Sep 12, 2018 in Kubernetes by lina
• 8,100 points
1,389 views

1 answer to this question.

0 votes

Adding ingress.kubernetes.io/ssl-redirect: "false" to annotations will disable the SSL redirect:

apiVersion: extensions/v1beta1

kind: Ingress

metadata:

  name: project_name-ingress

  annotations:

    nginx.ingress.kubernetes.io/rewrite-target: /

    ingress.kubernetes.io/ssl-redirect: "false"

spec:

  rules:

  - http:

      paths:

      - path: /

        backend:

          serviceName: project_name

          servicePort: 80

Note that false is wrapped in quotation marks. I found it didn't work without this string casting.

answered Sep 12, 2018 by Kalgi
• 39,170 points

Related Questions In Kubernetes

0 votes
1 answer

Forcing ssl for Kubernetes Ingress on GKE

https://github.com/kubernetes/ingress-gce#frontend-https If you want to block http, you ...READ MORE

answered Sep 6, 2018 in Kubernetes by ajs3033
• 7,280 points
1,042 views
0 votes
1 answer

ingress for kubernetes wordpress

You can configure your ingress to forward ...READ MORE

answered Sep 7, 2018 in Kubernetes by Kalgi
• 39,170 points
252 views
0 votes
1 answer

Kubernetes Ingress controllers for wildcard url mapping

If you use the stock controllers you ...READ MORE

answered Sep 10, 2018 in Kubernetes by Kalgi
• 39,170 points
693 views
0 votes
2 answers

Kubernetes Ingress running behind nginx reverse proxy

You need an ingress as mentioned by ...READ MORE

answered Sep 10, 2018 in Kubernetes by Hannah
• 14,090 points
1,180 views
0 votes
1 answer
0 votes
3 answers

Nginx reverse proxy URL getting rewritten

 take a look at  nginx.ingress.kubernetes.io/app-root and  nginx.ingress.kubernetes.io/rewrite-target annotations(https://kubernetes.github.io/.../nginx.../annotations/). I'm not sure ...READ MORE

answered Mar 6 in Kubernetes by Madhu
549 views
0 votes
1 answer

Kubernetes nginx-ingress TLS issue

You have to create a secret named test-secret. ➜ ...READ MORE

answered Sep 11, 2018 in Kubernetes by Kalgi
• 39,170 points
482 views
0 votes
1 answer
0 votes
2 answers

single point of entry for multiple services in kubernetes ingress

I tried having something similar too. Deployment apiVersion: extensions/v1beta1 kind: ...READ MORE

answered Sep 7, 2018 in Kubernetes by Hannah
• 14,090 points
100 views