Amazon-eks-ami: --kubelet-extra-args to support more than one parameters

Created on 27 Aug 2018  路  3Comments  路  Source: awslabs/amazon-eks-ami

As far as can understand it doesn't seem to be possible to use --kubelet-extra-args to pass more than one extra parameter. I would like to use this parameter to set both labels and taints but at the moment it only takes the first parameter after it.

ParameterKey=BootstrapArguments,ParameterValue="--kubelet-extra-args --register-with-taints=mytaintkey:mytaintvalueNoSchedule --node-labels=mykey=mylabel"

Does not apply the labels.

Most helpful comment

It should work. Try passing --kubelet-extra-args '--node-labels=spotfleet=true --register-with-taints=spotInstance=true:PreferNoSchedule'

$ kc get no -l spotfleet=true

NAME STATUS ROLES AGE VERSION
ip-192-168-237-225.us-west-2.compute.internal Ready 18h v1.10.3
ip-192-168-79-180.us-west-2.compute.internal Ready 18h v1.10.3

$ kc describe no/ip-192-168-237-225.us-west-2.compute.internal | grep "Taint\|Hostname"

Taints: spotInstance=true:PreferNoSchedule
Hostname: ip-192-168-237-225.us-west-2.compute.internal

All 3 comments

It should work. Try passing --kubelet-extra-args '--node-labels=spotfleet=true --register-with-taints=spotInstance=true:PreferNoSchedule'

$ kc get no -l spotfleet=true

NAME STATUS ROLES AGE VERSION
ip-192-168-237-225.us-west-2.compute.internal Ready 18h v1.10.3
ip-192-168-79-180.us-west-2.compute.internal Ready 18h v1.10.3

$ kc describe no/ip-192-168-237-225.us-west-2.compute.internal | grep "Taint\|Hostname"

Taints: spotInstance=true:PreferNoSchedule
Hostname: ip-192-168-237-225.us-west-2.compute.internal

As @pahud said, you need to surround multiple kubelet args with quotes.

I am sorry, I was convinced I had tried that as well. That works indeed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ismailyenigul picture ismailyenigul  路  8Comments

mogren picture mogren  路  7Comments

emman27 picture emman27  路  4Comments

pahud picture pahud  路  8Comments

ozbillwang picture ozbillwang  路  5Comments