kubernetes-sigs / external-dns

Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services
Apache License 2.0
7.66k stars 2.56k forks source link

No access to External DNS metrics outside the pod #4527

Open nlamirault opened 4 months ago

nlamirault commented 4 months ago

What happened:

Hi, I deploy External-DNS using the official helm charts. It uses the Cloudflare provider. All seems working (DNS record, controller, .... ) except retrieving metrics using the ServiceMonitor. I've got this error:

Get "http://10.0.4.199:7979/metrics": read tcp 10.0.0.129:55492->10.0.4.199:7979: read: connection reset by peer

If I try to retrieve metrics using port-forward on the Service, it works. Port-forward on the pod, it works. But if I try to retrieve metrics from other pods inside the cluster it doesn't work. wget 10.0.4.199:7979/metrics failed. It is due to the bind address localhost in the pod and not 0.0.0.0 ... but I don't find any argument for that.

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

k0da commented 4 months ago

@nlamirault I run netshoot pod in the same namespace and I'm able to access metrics:

curl http://external-dns-nonprod-external-dns:7979/metrics
# HELP external_dns_controller_last_reconcile_timestamp_seconds Timestamp of last attempted sync with the DNS provider
# TYPE external_dns_controller_last_reconcile_timestamp_seconds gauge
k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 week ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten