Publish non-Kubernetes application via ingress

Cluster information:

Kubernetes version: v1.28.4
Cloud being used: bare-metal (Raspberry Pi 4/5)
Installation method: snap
Host OS: Raspbian

apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  type: ExternalName
  externalName: 192.168.178.100
  ports:
    - name: hass
      port: 8123
      protocol: TCP
--- 

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: your-app-ingress
  annotations:
    cert-manager.io/cluster-issuer: "letsencrypt"
spec:
  ingressClassName: nginx
  tls:
  - hosts:
    - hass.domain.com
    secretName: tls.hass
  rules:
  - host: hass.domain.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: my-service
            port:
              number: 8123

I am currently trying to make my Home Assistant instance (which runs via Docker-Compose on the Raspberry Pi with the internal IP 192.168.178.100) available outside the cluster via the ingress nginx controller. When i run the yaml above and access https://hass.domain.com, i receive a “400: bad request”. Directly after applying the controller logs “dns.lua:152: dns_lookup(): failed to query the DNS server for 192.168.178.100: context.timer”.

Can be closed. The problem was not the Kubernetes-wise configuration, but the Home Assistant configuration which did not accept incoming traffic from a reverse proxy.
In the end this fixed the problem.