Kaneo pods could not resolve the Silo hostname
Pods don't read the workstation's /etc/hosts, so I added hostAliases to the Kaneo pod.
I was writing the Kaneo manifests for K3s.
Kaneo uses one S3 endpoint setting, http://silo.example.home.arpa, for two jobs: its own server-side S3 calls, and the presigned upload URLs it hands to the browser.
The signature on a presigned URL includes the exact Host header. So the browser and the Kaneo pod both have to reach Silo by that same name.
My workstation finds silo.example.home.arpa through a line in /etc/hosts. Pods don’t read my workstation’s /etc/hosts. They ask the cluster’s CoreDNS, which has never heard of that name.
For now I added hostAliases to the Kaneo Deployment. It maps the Silo, Kaneo and Gitea hostnames to the server’s LAN address, where Traefik answers. In-cluster requests then go through Traefik with the right Host header.
It works. I’m not sure it’s the right long-term answer, because every pod that needs these names will need its own copy of the mapping.
Is there a cleaner way you handle internal names inside K3s?
Recipes written later from this work: