Where do I specify node labels?
Hello!
I have a list of very different nodes - basically, an assortment of random SBCs that I want to give node labels as a selection target for workloads. For example, some of them may need the label cpu_perf=high for high-core count CPUs or generally higher spec chips, whilst others may need cpu_perf=low for the opposite.
How would I specify those using k0sctl?
Thank you and kind regards, Ingwie
There's this old issue https://github.com/k0sproject/k0sctl/issues/175 about adding labeling support.
Until that, maybe you could use after-hooks to run k0s kubectl .....
Huh, surprised this long-standing ticket has never seen an implementation o.o
Guess using the hooks is my best bet. Thanks for the pointer!
k0s itself has this option:
--labels mapStringString Node labels, list of key=value pairs
So you should be able to set this via k0sctl installFlags, something like:
- role: worker
installFlags:
- --labels=foo=bar
ssh:
address: 10.0.0.2