-
Hello, I've run into the situation with coredns. My context is that I have Keycloak running on the same machine. I have to use the domain to communicate via keycloak, but the regular domain DNS resolves to the public ip, which I cannot use due to proxies and stuff. Therefore I need to rewrite that domain to point to a local ip. If I do What I cannot seem to figure out is how to do this via a config map. Previous discussions focused on forwarding it to a private DNS server, but I need to resolve it to an actual ip, just like if I edit the root config via kubectl. If I do the following it doesn't seem to work: apiVersion: v1
kind: ConfigMap
metadata:
name: coredns-custom
namespace: kube-system
data:
NodeHosts: |
192.168.100.213 <domain-here> Can someone point me in the right direction or pinpoint the issue with the config map? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Don't do this. NodeHosts is not meant to be used that way. It is managed by K3s and will only contain entries for cluster members. Inject the hostname into the pods that need it via |
Beta Was this translation helpful? Give feedback.
Don't do this. NodeHosts is not meant to be used that way. It is managed by K3s and will only contain entries for cluster members.
Inject the hostname into the pods that need it via
spec.hostAlias
.