Closed siredmar closed 2 months ago
This is currently not supported. There are security mechanism in place which prevent overriding the hostname on the node (e.g csr controller) I'm also not sure if this is supported by cluster-api as the hostname is also used in different other aspects of the cluster lifecycle.
@batistein so you say that i don't have any chance of naming the nodes with a FQDN like
There is also going to be issues with the cloud-controller-manager, which relies on the assumption that hostname == name of server in API
to set the Node.Spec.ProviderID
.
I am not sure which naming requirements Machine
objects follow or how easily this can be configured in CAPI (with random suffixes and such). I saw that 1.5.2 release has support for customizing the naming of created objects in ClusterClass: https://github.com/kubernetes-sigs/cluster-api/pull/9340
/kind bug
What steps did you take and what happened: While setting up a cluster i need the nodes to be part of a custom wireguard VPN (netbird). In order to let them communicate with other nodes that are also connected to the VPN i need the hostnames to be resolvable by the VPN's DNS with the domain
netbird.cloud
. So i'm trying to set a FQDN name to the node. I'm added this command to the preKubeadmCommands:echo "KUBELET_EXTRA_ARGS=--hostname-override=$(hostname).netbird.cloud" > /etc/default/kubelet
However the kubelet won't start up correctly. These are the errors i get from kubelet
and
What did you expect to happen: I'd expect that i could change the node name by using the --hostname-override argument.
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
): 1.22.17/etc/os-release
): Ubuntu 22.04