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.
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 Ready18h v1.10.3
ip-192-168-79-180.us-west-2.compute.internal Ready18h 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.
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
$ kc describe no/ip-192-168-237-225.us-west-2.compute.internal | grep "Taint\|Hostname"