Configure the MetalLB speaker node selector¶
By default, MetalLB speakers are deployed on all Kubernetes nodes except master nodes. You can decrease the number of MetalLB speakers or run them on a particular set of nodes.
To customize the MetalLB speaker node selector:
kubeconfigof the Container Cloud management cluster, open the MOSK
Clusterobject for editing:
kubectl --kubeconfig <pathToManagementClusterKubeconfig> -n <OSClusterNamespace> edit cluster <OSClusterName>
spec:providerSpec:value:helmReleasessection, add the
spec: ... providerSpec: value: ... helmReleases: - name: metallb values: configInline: ... speaker: nodeSelector: metallbSpeakerEnabled: "true"
metallbSpeakerEnabled: "true"parameter in this example is the label on Kubernetes nodes where MetalLB speakers will be deployed. It can be an already existing node label or a new one.
Due to the issue with collocation of MetalLB speaker and the OpenStack Ingress service Pods, the use of the MetalLB speaker node selector is limited. For details, see  MetalLB speaker fails to announce the LB IP for the Ingress service.
You can add user-defined labels to nodes using the
This field contains the list of node labels to be attached to a node for the user to run certain components on separate cluster nodes. The list of allowed node labels is located in the
Starting from MOSK 22.3, if the
valuefield is not defined in
allowedNodeLabels, a label can have any value. For example:
allowedNodeLabels: - displayName: Stacklight key: stacklight
Before or after a machine deployment, add the required label from the allowed node labels list with the corresponding value to
machine.yaml. For example:
nodeLabels: - key: stacklight value: enabled
Adding of a node label that is not available in the list of allowed node labels is restricted.