Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

challenge backend failing health checks with GCE ingress #27

@ryane

Description

@ryane

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  /healthz

screenshot 2016-09-07 10 09 39

The /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.

screenshot 2016-09-07 10 36 12

gcloud compute backend-services get-health k8s-be-32044--eeba4b4d12737265  | grep healthState
  - healthState: UNHEALTHY
  - healthState: UNHEALTHY
  - healthState: UNHEALTHY

screenshot 2016-09-07 10 26 55

When 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?

screenshot 2016-09-07 10 34 49

$ 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: 10

If 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions