Labels
nodeLabels
become labels on the k8s Node objects
cloudLabels can be specified at the cluster and instance group level.
Labels specified at the cluster level will be copied to Load Balancers and to Master EBS volumes. They will also be merged to instance groups cloudLabels, with labels specified at the instance group overriding the cluster level.
A nice use for cloudLabels is to specify AWS cost allocation tags.
An example:
nodeLabels are specified at the instance group.
A good use for nodeLabels is to implement . cloudLabels and nodeLabels are automatically applied to new nodes created by AWS EC2 auto scaling groups.
An example:
Note that keys and values are strings, so you need quotes around values that YAML would otherwise treat as numbers or booleans.
To apply changes, you’ll need to do a kops update cluster
and then likely a
For AWS if kops rolling-update cluster --instance-group nodes
returns “No rolling-update required.” the --force
flag can be used to force a rolling update, even when no changes are identified.
Example: