-
Notifications
You must be signed in to change notification settings - Fork 262
challenge backend failing health checks with GCE ingress #27
Description
Background:
I have two existing GCE ingresses running without kube-lego. This is what the health checks look like:
$ gcloud compute http-health-checks list
NAME HOST PORT REQUEST_PATH
k8s-be-30804--eeba4b4d12737265 30804 /login
k8s-be-32516--eeba4b4d12737265 32516 /
k8s-be-32742--eeba4b4d12737265 32742 /healthzThe /login path is for a legacy service that does not expose a dedicated, unauthenticated health(z) endpoint. /login is used b/c it doesn't require authentication and returns a 200. The deployment behind this ingress exposes /login as a readinessProbe.
Issue:
Now I want to test kube-lego (0.1.2) with the echoserver sample. After deploying the echoserver ingress (and updating dns), I see a lot of errors in the kube-lego logs indicating that the reachability test is failing with wrong status code '502'. Sure enough, looking at the GCE load balancer, I can see that none of my nodes for the /.well-known/acme-challenge/* backend are healthy.
gcloud compute backend-services get-health k8s-be-32044--eeba4b4d12737265 | grep healthState
- healthState: UNHEALTHY
- healthState: UNHEALTHY
- healthState: UNHEALTHYWhen I look a the health checks again, I see that there are two /login paths. That doesn't seem right. The health check for the /.well-known/acme-challenge/* should be /healthz, right?
$ gcloud compute http-health-checks list
NAME HOST PORT REQUEST_PATH
k8s-be-30804--eeba4b4d12737265 30804 /login
k8s-be-32044--eeba4b4d12737265 32044 /login
k8s-be-32243--eeba4b4d12737265 32243 /
k8s-be-32516--eeba4b4d12737265 32516 /
k8s-be-32742--eeba4b4d12737265 32742 /healthz
$ gcloud compute http-health-checks describe k8s-be-32044--eeba4b4d12737265
checkIntervalSec: 1
creationTimestamp: '2016-09-07T07:12:18.014-07:00'
description: kubernetes L7 health check from readiness probe.
healthyThreshold: 1
host: ''
id: '304508149891440301'
kind: compute#httpHealthCheck
name: k8s-be-32044--eeba4b4d12737265
port: 32044
requestPath: /login
selfLink: https://www.googleapis.com/compute/v1/projects/imm-gce/global/httpHealthChecks/k8s-be-32044--eeba4b4d12737265
timeoutSec: 1
unhealthyThreshold: 10If I manually change the path for the k8s-be-32044--eeba4b4d12737265 health check to /healthz and then wait a few minutes, the backend for /.well-known/acme-challenge/* becomes healthy and kube-lego is able to get a certificate.
I can't figure out how the health check for the challenge endpoint is getting created with /login instead of /healthz. Is it somehow picking it up from the pre-existing ingress? Or am I doing some wrong here? Any ideas? Thanks!



