-
Notifications
You must be signed in to change notification settings - Fork 267
Lego Pod disappearing from kube-lego-nginx Service, leading to 503 errors when requesting new certificate #279
Comments
To be clear; this is what I'm seeing in the Note how the list of Pods is empty. After running However, for some reason the |
@simonswine @munnerz sorry if you're not the right people to ping but I'm wondering if this issue is on the radar? It's preventing me from using kube-lego at the moment. Thanks! |
The service will be created automaticly, and the service selector is app: kube-lego. So the deployment you create should with label app: kube-lego ,so you can check the deployment's label |
@deltcloud thanks for your reply. I'm afraid I don't really understand what you mean though – I'm a bit new to Kubernetes and the related terms. Can you elaborate on your answer? Thanks! |
when you create the lego, you need not create the service by yourself, the deployment will create the service with select label """app: kube-lego""", so you should create deployment with """app: kube-lego""", not """app: lego""" |
By the way, you can have a look at chart kube-lego (https://github.com/kubernetes/charts/tree/master/stable/kube-lego) |
I'm getting frequent
HTTP 503
status errors fromlego
, when it's requesting new certificates. Usingkube-lego
andkubernetes-nginx-ingress
on AWS.Logs from the
nginx
pod:Logs from the
lego
pod contain a whole lot of lines like these:I'm able to inspect the NGINX config with
kubectl -n infra exec nginx-1248418661-f20j4 cat /etc/nginx/nginx.conf
, which shows this:Seems like
kube-lego
isn't properly configured as backend in the NGINX config? I would expect thelocation ./well-known/acme-challenge
block to have aproxy_pass
to akube-lego
backend, but neither the backend nor theproxy-pass
are there.There is an Ingress for
kube-lego-nginx
:And there's a Service with no External endpoints:
I dug into this a bit further and found out that for some reason, after a certain amount of time, the
lego
Pod is no longer associated with thekube-lego-nginx
Service. To fix this, I manually recreate the Service withkubectl apply -f service.yaml
:As long as the
lego
Pod is available in thekube-lego-nginx
service, the NGINX config contains the correct upstream entry for the ACME endpoints, and SSL certificates are generated properly. As soon as the Pod disappears from thekube-lego-nginx
service, the503
errors start returning in thelego
logs.Versions
nginx-ingress-controller
:quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0-beta.17
kube-lego
:jetstack/kube-lego:0.1.5
The text was updated successfully, but these errors were encountered: