Trouble configuring ssl-redirect on Kubernetes Ingress

12/5/2017

I have configured an ingress on a kubernetes cluster from Google Cloud. I followed the instructions as is on this doc.

My manifest:

  apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: web-proxy
    annotations:
      ingress.kubernetes.io/force-ssl-redirect: "true"
  spec:
    tls:
    - hosts:
      - foo.bar.com
      secretName: foo-bar-secret
    rules:
    - host: foo.bar.com
      http:
    paths:
    - backend:
        serviceName: foo-bar-service
        servicePort: 80
      path: /*

From the documentation, it specifies that ssl-redirect is by default true if tls is configured but it doesn't work. I've also tried to set force-ssl-redirect to true(default is false), still no luck.

I'm confused if there is actually a bug or I'm doing something wrong, because when I run kubectl describe ing web-proxy, it displays that annotations were set:

Annotations:
  force-ssl-redirect:     true
  [...]

Any suggestions?

EDIT 1: I was using the 1.8.3.gke.0 version but when I upgraded to 1.8.4.gke.0 this seems to have solved the problem. I'll keep this post updated while I test more annotations(like: nginx.ingress.kubernetes.io/from-to-www-redirect)

-- Patrix
google-cloud-platform
https
kubernetes
nginx
ssl

0 Answers