This message was deleted.
# rke2
a
This message was deleted.
c
what is “it” that you are trying to resolve?
Ideally if you’re referencing something using a hostname, that hostname would be in DNS.
Editing hosts files should be a temporary workaround while you get DNS set up. It’s not something I would architect as a long-term solution.
e
We need to resolve the node name in the cluster, we have a security product which grabs the host name of the node, and as it doesn’t resolve to anything fails to run, we got a temporary fix by updating the host entry, we do have DNS but how do we get the random name of nodes to resolve to the IP dynamically?
c
I’m not sure what your environment looks like, but having working DNS is part of a basic network environment. Whatever’s allocating IPs and setting hostnames also creates a DNS entry for the host, either manually or based on the DHCP lease. On most cloud providers, the hostname is set to something that also resolves in the cloud provider’s DNS.
are the names truly “random” or are they determined by your provider?
e
When we resolve the IP on a node it returns the vsphere cloud provider service that’s runs on the cluster, the names of the nodes are based on our machine pool names followed by random string. Maybe there is something in our machine template which is wrong but we did get this signed off by a rancher resource as we are paying customers. Maybe better to open a ticket?
c
yeah, if you have support then I would engage them… but they might bounce it back to your network folks to figure out how to get DNS working properly in your env. You definitely need resolvable hostnames.
e
Thanks Brandon, will do that tomorrow morning 😀
s
We are provisioning via the rancher UI. The host name gets set as <cluster name-machinepool-random guid>. Is that rancher setting the host name then?
The workaround entails us updating the local host in the hosts file to look like 127.0.0.1 <host name> localhost
r
It sounds like you guys are talking about the node name that Rancher gives each node rather than the node's hostname. Is that what you're asking?
e
Yeah that’s correct, in saying that our node name matches the host name
r
There was a way to label hosts with their hostname when adding to Rancher so it'd show up on the page but I never got the node names matching myself.
s
Think we figured it out. In the rancher UI if we add ‘manage_etc_hosts: true’ to the cloud config section, then it seems to use a template in etc/cloud/templates/host.suse.tmpl which then sets the host name for us :)
141 Views