A simple DNS server that can be used to find the IP address of a pod in a daemonset that is running on a given node. Requests should be of the form ``` ...pod-locator. ``` Currently all requests that do not follow this pattern will not have an answer section. Currently only A type (ipv4) requests are answered. The server runs on port 5353. Currently any Daemonsets that are resolved using this server must be valid RFC 1123 DNS labels. This is in contrast to the kubernetes definition of a valid Daemonset name, which allows any valid DNS Subdomain Names. This means any Daemonset name that is longer that 63 characters or includes a `.` cannot be resolved using this resolver. The incoming DNS request must be a valid DNS name. This means its total length cannot be more than 253 characters, which means this resolver is unable to process requests for nodes with very long Node Names (Node Names must be valid DNS Subdomain Names, which means they cannot exceed 253 characters themselves, however the daemonset and namespace suffix required for this resolver will limit the length further). This resolver will accept node Names that have the `.` char. ## Response format When a pod is found the response from the server includes a single DNS RR record of Type A. When a pod is not found the server responds with a DNS record with 0 answers. The TTL of the response is always set to 0. An example of querying the resolver and the reply using `dig` can be seen below ``` / # dig @127.0.0.1 -p 5353 edge-worker2.vncserver.novnc-72516fb3.pod-locator. ; <<>> DiG 9.16.36 <<>> @127.0.0.1 -p 5353 edge-worker2.vncserver.novnc-72516fb3.pod-locator. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35526 ;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;edge-worker2.vncserver.novnc-72516fb3.pod-locator. IN A ;; ANSWER SECTION: edge-worker2.vncserver.novnc-72516fb3.pod-locator. 0 IN A 10.244.2.4 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#5353(127.0.0.1) ;; WHEN: Fri Jan 06 11:02:26 UTC 2023 ;; MSG SIZE rcvd: 132 ```