NerdyNik

My Random Collection of Writeup, Notes, Findings, and Muzings

Unrecognized Name issues with HomeAssistant

How to resolve the Unrecognized Name issues within Kubernetes Pods

Recently I ran into an issue while trying to create a new instance of HomeAssistant on a K3s install of Kubernetes. Getting HomeAssistant up and running and connected to an MQTT server within the same cluster worked as expected. However, the issue came up when I attempted to get it to connect to NabuCasa or make connections out to any TLS/SSL (HTTPS) addresses. Viewing the HomeAssistant logs from the `Settings->System->Logs` area, I noticed I was getting a very vague error of `tlsv1 unrecognized name`.

Exposing Kubernetes Services with CoreDNS

Leveraging CoreDNS with K8s to Expose Services Externally

Automating the external resolution of Kubernetes Pods/Applications for self-hosted K8s Clusters requires a bit more work then when leveraging a Cloud Providers K8s service. One of the better options I've found is to leverage the Kubernetes `external-dns` sig, which most CSPs also do, with CoreDNS to provide the external DNS resolution.