News for hackers. Stuff that matters.
Re:It's not always DNS – unless it is by mad_vill on Friday December 22, 2023 @10:12AM (#38734878)
Sounds more like a kubernetes problem than a dns problem.

I hate coredns. Everything running inside of a kubernetes cluster should just be querying the kubernetes endpoints api for these IPs directly and using the node dnsservers for external hosts.

Re:It's not always DNS – unless it is by dharmab on Friday December 22, 2023 @11:57AM (#38736056)
> Everything running inside of a kubernetes cluster should just be querying the kubernetes endpoints api for these IPs directly

Wouldn't this put a huge load on the apiserver? Not to mention it's incompatible with software not designed for Kubernetes.

Re:It's not always DNS – unless it is by remram on Friday December 22, 2023 @10:45AM (#38735199)
The options for that are:

* dnsPolicy: Default

* enableServiceLinks: true (the default)

Then you can use MYDATABASENAME_SERVICE_HOST from the environment and there is no CoreDNS in the path at all.

Re:It's not always DNS – unless it is by eptcyka on Friday December 22, 2023 @11:31AM (#38735761)
If I restart my DB, will the database service host env var also be updated? Will restarting a DB or changing the IP of a DB will also imply a restart of all of the services that need access to the DB?
Re:It's not always DNS – unless it is by remram on Friday December 22, 2023 @11:45AM (#38735907)
The service's ClusterIP will not change.

Unless you want to also get rid of kube-proxy, in addition to CoreDNS; in that case you don't get ClusterIPs for services.

To be honest kube-proxy and CoreDNS are probably the only components I haven't had problems with on my cluster.

Re:It's not always DNS – unless it is by paulddraper on Friday December 22, 2023 @03:40PM (#38738418)
> querying the kubernetes endpoints api for these IPs directly

Isn't DNS built explicitly for this?

This might fix problems accidentally, at the cost of k8 dependency.