Using the node selector
By default, the IBM Storage Scale Container Storage Interface driver gets deployed on all worker nodes. The node selector controls the Kubernetes worker nodes on which the IBM Storage Scale Container Storage Interface driver must run. It helps in cases where new worker nodes are added to Kubernetes cluster but do not have IBM Storage Scale installed. It helps in ensuring that sidecar pods are running on the desired nodes.
To configure node selector, perform the following steps:
- Label the Kubernetes worker nodes where sidecar pods should run, as shown in the following example:
-
kubectl label node node1 infranode=1 --overwrite=true -
kubectl label node node2 infranode=2 --overwrite=true
Note:- Use specific labels like the one for attacher and provisioner sidecar pods, only if there is a requirement of running these sidecar pods for very specific nodes. Otherwise, use single label like scale=true for running sidecar pods and IBM Storage Scale Container Storage Interface driver DaemonSet.
- Nodes marked for running sidecar pods must be a subset of the nodes marked with the scale=true label.
-
- Label the Kubernetes worker nodes where IBM Storage Scale Container Storage Interface
driver
must run, as shown:
kubectl label node node1 scale=true --overwrite=true - Configure the following parameters in the Operator custom resource (
csiscaleoperators.csi.ibm.com_cr.yaml) under the "spec" section. IBM Storage Scale client must be installed and running on the nodes that have the scale=true label.attacherNodeSelector: - key: "scale" value: "true" # - key: "infranode" # Only if there is requirement of running Attacher # value: "2" # on specific Node provisionerNodeSelector: - key: "scale" value: "true" # - key: "infranode". # Only if there is requirement of running Provisioner # value: "1" # on specific Node snapshotterNodeSelector: - key: "scale" value: "true" # - key: "infranode" # Only if there is requirement of running Snapshotter # value: "2" # on specific Node pluginNodeSelector: - key: "scale" value: "true" resizerNodeSelector: - key: "scale" value: "true" # - key: "infranode" # Only if there is requirement of running Resizer # value: "2" # on specific Node
Note: If you choose to run IBM Storage Scale Container Storage Interface
driver on selective
nodes using the nodeSelector, then make sure that the pod using IBM Storage Scale Container Storage Interface
driver PVC is scheduled on the nodes where IBM Storage Scale Container Storage Interface
driver is running.