Programmatically Set Kubernetes Node Name Using Machine Class #925
Replies: 1 comment
-
Anything would be possible, but I'd be interested to understand the reason this is needed. We currently assign random, stable names. Assigning incremental names initially might work but would likely be hard to maintain. For example, if you retired worker-2 and added a new machine should that be worker-4 or take the name worker-2? Would patches be applied to individual nodes automatically or be templated on the machine class? If you don't apply individual patches it would be hard to match which node hostname matches which UUID in Omni. Patches also stay with nodes even when they're outside of a cluster. So if machines are re-used and re-provisioned to a new cluster should they keep their hostname patches or should the new machine class rule (if one is being used) be applied? |
Beta Was this translation helpful? Give feedback.
-
Hi folks,
In Talos, we can configure the Kubernetes node name using:
This works well for setting a static node name, but when using Machine Class, which abstracts individual machine configurations, would it be possible to allow users to configure the node name programmatically?
For example, if we set
hostname: worker
in a Machine Class configuration applied to multiple nodes, an incremental suffix could be appended automatically, resulting in names like:worker-1
worker-2
worker-3
Is there a recommended way to achieve this, or could this be a feature in consideration?
Beta Was this translation helpful? Give feedback.
All reactions