cloudflare / cloudflare-ingress-controller

A Kubernetes ingress controller for Cloudflare's Argo Tunnels
Apache License 2.0
365 stars 55 forks source link

translator secret not defined on ingress #166

Closed georgeboot closed 5 years ago

georgeboot commented 5 years ago

I followed the guides provided in this repo.

I'm trying to set up an ingress for pos-ui.domain.com. I've created the secret (also tried using the generated cert from cloudflare because it's a subdomain) in the same namespace as the ingress and service are in. I tried naming the secret both domain.com and pos-ui.domain.com

I've also setup the argo-tunnel and corresponding rbac rules in it's own namespace: cloudflare

After creating the ingress, the logs of the argo-tunnel deployment say:

level=error msg="translator secret not defined on ingress: pos-ui/pos-ui-argo-tunnel, host: pos-ui.domain.com"

What am I missing here?

mattalberts commented 5 years ago

See error message here: https://github.com/cloudflare/cloudflare-ingress-controller/blob/6008d2e0b34b65d9549ef2ef91206b306e2090bd/internal/argotunnel/translator.go#L204

It means you haven't defined a secret for the host specified by the ingress. What does your Ingress spec look like? I'm guessing that it is missing the tls section, or you have a tls section but have not specified the secret name (and have not define a default secret).

georgeboot commented 5 years ago

Ah yes I was indeed missing the TLS part. We use Rancher which allows you to add the annotations etc, but it doesn't add the tls section.

Thank you!