What does HackerNews think of external-dns?

Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services

Language: Go

#10 in Kubernetes
Disclaimer: I work for AWS but had nothing to do with this blog post (I'm seeing it for the first time with everyone else here).

I think this is an unfair summary of the post. Of course, using Kubernetes to orchestrate other AWS services is going to be a go-to example on the _AWS_ blog, but there is plenty of vendor-agnostic software doing similar things: DNS Records[1], Databases[2], even using Kubernetes CRDs to deploy Kubernetes[3].

The idea of using Kubernetes as an API to orchestrate external resources doesn't inherently lock you into any single vendor.

1: https://github.com/kubernetes-sigs/external-dns 2: https://github.com/kubedb/operator 3: https://cluster-api.sigs.k8s.io/

Sure it does, I ran kube-vip[1](but there are many others, e.g. metallb) as my cloud controller, all it needs are valid static IPs/range/dhcp and it will assign these to LoadBalancer services(which you usually only need one of for your ingress) and it will either ARP or use BGP to route external traffic.

As for DNS records, external-dns[2] works perfectly as long as your DNS as some way to doing automatic updates.

1. https://kube-vip.io/

2. https://github.com/kubernetes-sigs/external-dns

Actually I'm using it on bare metal and it works. Initial setup wasn't very hard but I think it could be more intuitive. Overall I think documentation for self-hosting kubernetes sometimes a bit incomplete.

Yes, I need to add A records with IPs for each domain, but that's one time setup. I did it manually, but you can automate it [1] (depends on what you use for DNS provider but you can extend it to support your provider or maybe there is another existing solution).

I'm not sure that one server in front of the cluster is more reliable than using all cluster nodes for load balancing. I guess that in automated solutions like [1] cluster's node could be automatically deleted from DNS if it went down.

My setup is not so big so I don't have real need for load balancing, but it seems possible with existing solutions.

[1] https://github.com/kubernetes-sigs/external-dns

Definitely wider than they say. I cannot access e.g. https://github.com/kubernetes-sigs/external-dns, which should be just the homepage of a project.
I'm doing something similar though I've opted specifically to _do_ use Kubernetes via k0s [0]. It works wonderfully well and allows me to use most things that are available in the k8s ecosystem like cert-manager [1] and external-dns [2]. All configuration is stored in Git and the server itself is basically disposable as it only runs k0s and some very basic stuff like iptables rules.

I see this sentiment quite a lot that k8s is too complex for small scale setups, but in my experience it scales down very well to small setups. Granted, you do have to know how to work with k8s, but once you learn that you can apply that knowledge to many different kinds of setups like k0s, bare metal, EKS/AKS etc.

[0] https://k0sproject.io/

[1] https://cert-manager.io/

[2] https://github.com/kubernetes-sigs/external-dns

> Single node proxmox VM/LXC mix homeserver. Is learning K8S worthwhile?

Maybe, although if you're fully happy with your current setup then probably not unless you just want to explore and learn new things.

I use kubernetes "at home" (ok, well it's an OVH server, but I use it for personal/home stuff), and I like it. I happen to run a wide variety of apps for myself and friends, already used docker, and I was somewhat reaching the limits of docker compose.

I really like the consistent ecosystem, and that k8s cleanly deals with problems like TLS termination with LE[1] and automatically updating my DNS[2]. I like that I can just write down what I want in a YAML file and don't have to mess around with docker commands or package managers or what else.

It's not for everyone, but I wouldn't say there's no value in it, especially if you're already using containers or a similar tool.

1: https://cert-manager.io/docs/

2: https://github.com/kubernetes-sigs/external-dns

> Is there a service for autoconfiguring the DNS

There is! I use external-dns. [1]

I haven't actually set up a Let's Encrypt wildcard cert, but I'm pretty certain cert-manager [2] supports it. I don't think you need a proxy if you use the DNS01 challenges.

[1] https://github.com/kubernetes-sigs/external-dns/

[2] https://cert-manager.io/docs/

You should post a link to your article in the community blog post section of the external-dns GitHub readme https://github.com/kubernetes-sigs/external-dns
I agree with you that we still have some ways to go with getting LB right, especially WRT to K8S. I think one of the problems is that it seems like every different app is a snowflake with different requirements, so all of these libraries try to be the jack of all trades, leaving the mastery to custom scripts (if it's even obtainable).

For instance: https://github.com/kubernetes-sigs/aws-alb-ingress-controlle...

Also, and you probably already know about this, but it's true that ingress won't create the record automatically for you - but external-dns ( https://github.com/kubernetes-sigs/external-dns ) will - with the correct annotations (pretty simple), external-dns will watch for changes to ingress and publish the dns records on R53 (and many other DNS providers) for you. It works really well for us, even when the subdomain is shared with other infrastructure not managed by itself.

I use MetalLB to allocate RFC1918 IPs out of a dedicated pool to LoadBalancer services. MetalLB then publishes these to my router over BGP because, you know, why not?

I then have external-dns running (https://github.com/kubernetes-sigs/external-dns) which manages the relevant A/CNAME records on Google DNS (other DNS providers are supported) so that I can resolve "myservice.mydomain.com" to the service's IP address.

I wrote a bit about the BGP bit last year: https://www.growse.com/2019/04/13/at-home-with-kubernetes-me...

Admittedly, I have no desire to expose any of these service to the internet, but if I did I could use an IPv6 address on the service instead, or add a static NAT rule to the router to forward traffic to the service IPv4 address. Auto provisioning of NAT rules feels icky, so I'd probably go down the ipv6 route if I wanted to do this.