Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Pihole obtains its hostname from its node, not the chart #324

Open
3ulalia opened this issue Nov 24, 2024 · 0 comments
Open

Bug: Pihole obtains its hostname from its node, not the chart #324

3ulalia opened this issue Nov 24, 2024 · 0 comments

Comments

@3ulalia
Copy link

3ulalia commented Nov 24, 2024

This is a bit of an odd question (and one that is very difficult to search for!) but I'm running into a problem when trying to use Pi-Hole on my one-node (for now) k3s cluster.

Despite setting the following lines in my values.yaml, the hostname as reported in the top-right corner of the Pihole GUI is the name of the node that the pod is scheduled on, rather than that of the pod itself.

# -- hostname of pod
hostname: "pihole"
# [...]
virtualHost: pihole.mydomain.org
# [...]
ftl:
  PIHOLE_PTR: "NONE"

I have serviceDns and serviceDhcp configured to use a pureLB load balancer, and serviceWeb to use a ClusterIP with the ingress enabled (hence the virtualHost line above).

I've set the CNAME and A records necessary to resolve pihole.mydomain.org internally, and I can of course also hit the dashboard at pi.hole, but nodeHostName.mydomain.org also resolves to the dashboard.

As a result of these configurations, running ip a on the node itself gives me:

2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 18:66:da:29:15:3f brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.3/24 brd 192.168.2.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet 192.168.2.128/24 brd 192.168.2.255 scope global secondary enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::1a66:daff:fe29:153f/64 scope link
       valid_lft forever preferred_lft forever

192.168.2.3 is the node's "actual" IP on the network, and 192.168.2.128 is the load-balancer IP I've assigned to serviceDns and serviceDhcp through pureLB annotations.

My only theory is that the pi-hole is performing a reverse DNS lookup on the IP it sees (192.168.2.128) and finding the node's hostname, rather than its own, but then what's the point of the hostname field in the chart?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant