hetzner-k3s
hetzner-k3s copied to clipboard
Support node labels
Firstly, thanks a lot for the nice project! Is there any plan to support custom label or annotations for servers, since it's very useful for separating the deployments between nodes. There are a bunch of default labels like instance type, location, hostname but sometime devs need to have some custom labels, too.
Does this need to happen during deployment? I add additional labels and taints aftrewards.
Hi @sananguliyev, the tool doesn't add any labels to the nodes. What kind of labels where you thinking?
Thanks for your answer. Let's assume that I am using the same type of servers for 2 different purposes.
- API gateway
- SQL Engine
It's very useful to add labels to nodes so when I deploy my gateway I can specify in my k8s deployment that run this app only on the nodes which has labelled api-gateway
.
Edit: I am talking about nodeAffinity
I understand. However I think this goes beyond the scope of the tool which is creating clusters with a common configuration. What you are asking is for specific use cases. Would you want to add the same labels on all the nodes in a pool or how?
Yes, exactly. I would like to have those labels on all nodes in the pool, otherwise it would be too specific.
Desired configuration:
worker_node_pools:
- name: sql-engine-small
instance_type: cpx21
instance_count: 3
labels:
purpose: sql-engine
size: small
Ok, I'll see what I can do.
Perfect. Thanks in advance.
@vitobotta if you add this you can also go ahead and add the same for taints, i.e.
worker_node_pools:
- name: sql-engine-small
instance_type: cpx21
instance_count: 3
labels:
purpose: sql-engine
size: small
taints:
key: value
Would be more consistent ;)
Ok
Implemented in v0.6.2. Please give it a try and let me know how it goes.