When using Scaleway’s managed Kubernetes, Kapsule, any tags assigned to the pool will propagate to all Instances within the pool, thus affecting all Kubernetes nodes associated with it.
This feature applies to Kosmos Scaleway pools as well. However, note that this functionality does not extend to multi-cloud
pools or external nodes outside of the Scaleway infrastructure.
Managing Tags with the Scaleway Cloud Controller Manager (CCM)
The Scaleway Cloud Controller Manager (CCM) will also synchronize the tags of Scaleway Instances to Kubernetes labels on the nodes.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Created a Kubernetes cluster
Labels
In order for a tag to be synced to a label, it needs to be of the form foo=bar
.
In this case, the Kubernetes nodes will have the label k8s.scaleway.com/foo=bar
.
Once the tag is removed from the Instance, it will also be removed as a label on the node.
Non prefixed labels
It is possible to add labels not prefixed with k8s.scaleway.com
. The downside is that deleting the associated tag does not remove the label.
In order to have non prefixed labels, you should prefix the tag with noprefix=
.
For instance, the tag noprefix=foo=bar
will yield the foo=bar
label on the Kubernetes nodes.
This is the only way to add custom prefixed labels like node.kubernetes.io
.
Taints
In order for a tag to be synced to a taint, it needs to be of the form taint=foo=bar:Effect
, where Effect
is one of NoExecute
, NoSchedule
or PreferNoSchedule
.
In this case, the Kubernetes nodes will have the taint k8s.scaleway.com/foo=bar
with the effect Effect
.
Once the tag is removed from the instance, it will also be removed as a taint on the node.
Non prefixed Taints
It is possible to add taints not prefixed with k8s.scaleway.com
. The downside is that deleting the associated tag does not remove the taint.
In order to have non prefixed taints, you should prefix the taint with taint=noprefix=
.
For instance, the tag taint=noprefix=foo=bar:Effect
will yield the foo=bar
taint on the Kubernetes nodes with the Effect
effect.
This is the only way to add custom prefixed taints like node.kubernetes.io
.
Special Kubernetes labels
node.kubernetes.io/exclude-from-external-load-balancers
can be set on the Kubernetes nodes if this same value is set as a tag on the Instance. It will have the valuemanaged-by-scaleway-ccm
and will be deleted if deleted from the tags.