https://rancher.com/ logo
Title
h

hundreds-state-15112

05/11/2023, 5:16 PM
Anyone have thoughts on why the hostname of my k3s cluster node change from the FQDN it started with to it’s shortname after an outage? Or vice versa?
When I run
hostname
it does not return the FQDN it has listed in the hosts file
c

creamy-pencil-82913

05/11/2023, 5:21 PM
That is not something k3s would have any influence over
r

rough-farmer-49135

05/11/2023, 11:36 PM
check /etc/hostname, that's where it actually lives. You can edit the file and reboot to add your domain name back.
h

hundreds-state-15112

05/11/2023, 11:41 PM
Bill is correct, that is the difference. Thanks for closing that loop for me. I knew k3s just “referenced” something but I wasn’t 100% sure what that was. Thank you both.
r

rough-farmer-49135

05/11/2023, 11:43 PM
I'd be shocked if k3s had anything to do with it. If your uptime's large it could've been changed anywhere between now & your previous reboot. You can also change it with the hostname command I think, and most distros have their own other commands to change as well.
h

hundreds-state-15112

05/11/2023, 11:46 PM
Yeah we had an outage and I figured it was some combination of local configuration files and DNS. /etc/hosts was correct, /etc/hostname was not
Anyway we’re all good now, thanks y’all