Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add labels to an autoscaled worker node? #526

Open
jampy opened this issue Jan 30, 2025 · 2 comments
Open

How to add labels to an autoscaled worker node? #526

jampy opened this issue Jan 30, 2025 · 2 comments

Comments

@jampy
Copy link

jampy commented Jan 30, 2025

In my config I have...

masters_pool:
  instance_type: cpx21
  instance_count: 3
  location: nbg1

worker_node_pools:
  - name: worker
    instance_type: cpx41
    instance_count: 3
    location: nbg1
    labels:
      - key: node-role.kubernetes.io/worker
        value: "true"
    autoscaling:
      enabled: true
      min_instances: 2
      max_instances: 5

...and no other nodes.

Since I need to configure a Helm chart to exclude DaemonSet Pods from the master nodes, I tried to add the labels above.

However, kubectl describe node xxx does not show the desired label:

Name:               my-test-cluster-worker-#########
Roles:              <none>
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/instance-type=cpx41
                    beta.kubernetes.io/os=linux
                    csi.hetzner.cloud/location=nbg1
                    failure-domain.beta.kubernetes.io/region=nbg1
                    failure-domain.beta.kubernetes.io/zone=nbg1-dc3
                    instance.hetzner.cloud/provided-by=cloud
                    kubernetes.io/arch=amd64
                    kubernetes.io/hostname=my-test-cluster-worker-#######
                    kubernetes.io/os=linux
                    node.kubernetes.io/instance-type=cpx41
                    topology.kubernetes.io/region=nbg1
                    topology.kubernetes.io/zone=nbg1-dc3

Am I doing something wrong?

@jampy
Copy link
Author

jampy commented Jan 30, 2025

Closing because I just found out that Autoscaling nodes unfortunately do not support labels

@jampy jampy closed this as completed Jan 30, 2025
@vitobotta
Copy link
Owner

It's on my list IIRC because labels and taints should now be supported. I am reopening so I can notify you here when it's done. I need to do this quite soon because we need it at work as well.

@vitobotta vitobotta reopened this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants