external-dns icon indicating copy to clipboard operation
external-dns copied to clipboard

Pi-hole support

Open reesericci opened this issue 4 years ago • 34 comments
trafficstars

What would you like to be added: Pi-hole support as dns provider. Why is this needed: I use my kubernetes in my homelab and pihole as my network level dns. I would like to be able to use my pihole with external-dns.

reesericci avatar Jan 24 '21 00:01 reesericci

anyone?

reesericci avatar Mar 19 '21 14:03 reesericci

I've done a brief investigation into this for exactly the same reasons. From what I can ascertain by digging through the source code of pihole and looking at the community api wrapper (https://pypi.org/project/PiHole-api/ or https://github.com/Ewpratten/PiHole-api) pihole does not have endpoints to update local dns records programatically yet.

This led me to look into RFC2136 as an option but alas it seems pihole itself does not support RFC2136 anywhere in the documentation or forums that I can find.

I think changes would need to happen over at the pihole project before they can happen here.

sysadmiral avatar Apr 26 '21 20:04 sysadmiral

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale

k8s-triage-robot avatar Jul 27 '21 03:07 k8s-triage-robot

oof. so someone needs to create an API endpoint to add dns records...

reesericci avatar Aug 04 '21 18:08 reesericci

Will be great to see this working. @reesericci maybe you can open an issue on the pihole side? I also found this one here: https://github.com/Pobek/external-dns-pihole

HaveFun83 avatar Aug 21 '21 22:08 HaveFun83

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

k8s-triage-robot avatar Sep 20 '21 23:09 k8s-triage-robot

Chiming in on the stale thread to say this is...doable. Albeit ugly until Pi-Hole implements a true API for their Local DNS functionality.

I'm playing with a fork on my home cluster to see if I can get a full implementation working. Will create a PR if I have any luck.

tinyzimmer avatar Sep 24 '21 20:09 tinyzimmer

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

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

/close

k8s-triage-robot avatar Oct 24 '21 21:10 k8s-triage-robot

@k8s-triage-robot: Closing this issue.

In response to this:

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

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

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Oct 24 '21 21:10 k8s-ci-robot

/reopen

reesericci avatar Oct 24 '21 22:10 reesericci

@reesericci: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Oct 24 '21 22:10 k8s-ci-robot

I will open an issue with the pihole project.

reesericci avatar Oct 24 '21 22:10 reesericci

It looks like they are in construction on a totally new JSON API which will take quite a while...

reesericci avatar Oct 24 '21 22:10 reesericci

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

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

/close

k8s-triage-robot avatar Nov 23 '21 23:11 k8s-triage-robot

@k8s-triage-robot: Closing this issue.

In response to this:

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

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

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 23 '21 23:11 k8s-ci-robot

This issue should be reopen, because it is still useful and an open PR is available for it #2321

/reopen

davinkevin avatar Nov 24 '21 19:11 davinkevin

@davinkevin: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

This issue should be reopen, because it is still useful and an open PR is available for it #2321

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 24 '21 19:11 k8s-ci-robot

@davinkevin: You can't reopen an issue/PR unless you authored it or you are a collaborator.

It worth trying 😅

davinkevin avatar Nov 24 '21 19:11 davinkevin

/reopen

reesericci avatar Nov 26 '21 02:11 reesericci

@reesericci: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 26 '21 02:11 k8s-ci-robot

There you go @davinkevin, didn't know about that PR. I was going to re-open once the new API was done, but now that PR exists.

reesericci avatar Nov 26 '21 02:11 reesericci

/remove-lifecycle rotten

reesericci avatar Nov 26 '21 02:11 reesericci

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Feb 24 '22 03:02 k8s-triage-robot

The new release will provide REST API for PiHole.

Add API call to manage custom DNS and CNAME records

How does this PR accomplish the above?:
Add new DNS record
http://ADDRESSOFPIHOLE/admin/api.php?customdns&action=add&ip=IPADDRESS&domain=youdomain&auth=XXX
Delete existing DNS record
http://ADDRESSOFPIHOLE/admin/api.php?customdns&action=delete&ip=IPADDRESS&domain=youdomain&auth=XXX
List existing DNS records
http://ADDRESSOFPIHOLE/admin/api.php?customdns&action=get&auth=XXX

Add new CNAME record
http://ADDRESSOFPIHOLE/admin/api.php?customcname&action=add&domain=YOURCNAME&target=TARGETDOMAIN&auth=XXX
Delete existing CNAME record
http://ADDRESSOFPIHOLE/admin/api.php?customcname&action=delete&domain=YOURCNAME&target=TARGETDOMAIN&auth=XXX
List existing CNAME records
http://ADDRESSOFPIHOLE/admin/api.php?customcname&action=get&auth=XXX

Check out this PR

ionutz89 avatar Mar 02 '22 14:03 ionutz89

/remove-lifecycle stale

reesericci avatar Mar 02 '22 14:03 reesericci

Add new DNS record http://ADDRESSOFPIHOLE/admin/api.php?customdns&action=add&ip=IPADDRESS&domain=youdomain&auth=XXX

Delete existing DNS record http://ADDRESSOFPIHOLE/admin/api.php?customdns&action=delete&ip=IPADDRESS&domain=youdomain&auth=XXX

List existing DNS records http://ADDRESSOFPIHOLE/admin/api.php?customdns&action=get&auth=XXX

Add new CNAME record http://ADDRESSOFPIHOLE/admin/api.php?customcname&action=add&domain=YOURCNAME&target=TARGETDOMAIN&auth=XXX

Delete existing CNAME record http://ADDRESSOFPIHOLE/admin/api.php?customcname&action=delete&domain=YOURCNAME&target=TARGETDOMAIN&auth=XXX

List existing CNAME records http://ADDRESSOFPIHOLE/admin/api.php?customcname&action=get&auth=XXX

This is perfect!

reesericci avatar Mar 02 '22 14:03 reesericci

It's available in Pihole web v5.11 or newer

reesericci avatar Mar 02 '22 14:03 reesericci

Please make this happen!! I would love this too

anubisg1 avatar Apr 10 '22 19:04 anubisg1

All we need now is an actual integration, the work on the pi-hole side is done

reesericci avatar Apr 11 '22 04:04 reesericci

anything new?

asdfgugus avatar Apr 24 '22 19:04 asdfgugus

Please, do we have any feedback on this request? This feature will help me a lot in a project for the children's school

linuxmall avatar Apr 27 '22 13:04 linuxmall