jetstack / kube-lego

DEPRECATED: Automatically request certificates for Kubernetes Ingress resources from Let's Encrypt
Apache License 2.0
2.16k stars 267 forks source link

Only 404 after updating an ingress resource #255

Closed tscolari closed 6 years ago

tscolari commented 6 years ago

Hello,

I'm playing around with ingress in a very simple setup:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: tscolari-blog-test
  annotations:
    kubernetes.io/tls-acme: "true"
    kubernetes.io/ingress.class: "nginx"
spec:
  tls:
  - hosts:
    - kube.tscolari.me
    secretName: kube.tscolari.me
  backend:
    serviceName: tscolari-blog
    servicePort: 80
  rules:
  - host: kube.tscolari.me

So everything works initially, and if I run kubectl get ing can see both, my ingress I just created and the kube-lego-nginx one. But, if for some reason, I run kubectl replace -f to update my ingress configuration, every request will be 404 after that:

10.32.0.1 - [10.32.0.1] - - [11/Sep/2017:17:53:40 +0000] "GET / HTTP/2.0" 404 21 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36" 10 0.001 [upstream-default-backend] 10.32.0.11:8080 21 0.001 404

If I manually delete kube-lego-nginx ingress, redirection works back again.

Description of the kube-lego-nginx:

Name:                   kube-lego-nginx
Namespace:              default
Address:                10.4.103.197
Default backend:        default-http-backend:80 (<none>)
Rules:
  Host                  Path    Backends
  ----                  ----    --------
  kube.tscolari.me
                        /.well-known/acme-challenge     kube-lego-nginx:8080 (<none>)
Annotations:
  ssl-redirect: false
Events:
  FirstSeen     LastSeen        Count   From                    SubObjectPath   Type            Reason  Message
  ---------     --------        -----   ----                    -------------   --------        ------  -------
  20m           20m             1       ingress-controller                      Normal          CREATE  Ingress default/kube-lego-nginx
  20m           20m             1       ingress-controller                      Normal          UPDATE  Ingress default/kube-lego-nginx

Is this expected? What is the usual way to update an ingress configuration?