The CSI Driver for Dell EMC PowerFlex is a plug-in that is installed in Kubernetes to provide persistent storage, using PowerFlex. In addition to our Kubernetes environment, we also need a CSI Driver for Dell EMC PowerFlex to complete the automation process. CSI plug-ins are a Kubernetes-defined standard that Dell Technologies and others use to expose block and file storage to container orchestration systems. CSI plug-ins unify storage management across many container orchestration systems, including Mesos, Docker Swarm, and Kubernetes.
Helm charts initiate the installation of the CSI driver. The Helm chart uses a shell script to install the CSI Driver for Dell EMC PowerFlex. This script installs the CSI driver container image and the required Kubernetes sidecar containers.
To configure the CSI Driver for Dell EMC PowerFlex:
- Install Kubernetes (see the previous section for Installing Kubernetes).
- Verify that zero padding is enabled on the PowerFlex storage pools that will be used. Use PowerFlex GUI or the PowerFlex CLI to check this setting.
Then complete the following tasks (defined in detail in the following sections) for configuring the CSI Driver:
- Enable the Kubernetes feature gates
- Configure the Docker service
- Install the Helm package manager
- Install the PowerFlex Storage Data Client (SDC)
- Install the CSI Driver for Dell EMC PowerFlex
Enable the Kubernetes feature gates
Enable the required Kubernetes feature gates before installing the CSI Driver for Dell EMC PowerFlex. In this case, we enable the VolumeSnapshotDataSource feature gate as shown in the steps below:
- On each Kubernetes master and worker node, to set feature gate settings for the kubelets, edit the /var/lib/kubelet/config.yaml file by adding the following line at the end:
- On the master node, set the feature gate settings of the kube-apiserver.yaml file:
Append the following line to the kube-apiserver.yaml file
- On the master node, set the feature gate settings of the kube-controller-manager.yaml file as follows:
Append following line to the kube-controller-manager.yaml file:
- On the master node, set the feature gate settings of the kube-scheduler.yaml file as follows:
Append the following line to the kube-scheduler.yaml file:
- On each node, edit the variable KUBELET_KUBECONFIG_ARGS of /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf file as follows:
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --feature-gates=VolumeSnapshotDataSource=true"
- Use the following commands to restart the kubelet on all nodes:
systemctl restart kubelet
Configure the Docker service
Configure the mount propagation in Docker on all Kubernetes nodes before installing the CSI driver. Mount propagation volumes mounted by a Container to be shared with other Containers in the same Pod, or even to other Pods on the same node.
- Edit the service section of /etc/systemd/system/multi-user.target.wants/docker.service file as follows:
- Restart the Docker service.
systemctl restart docker
Install the Helm package manager
Helm is a package manager. A companion server component called Tiller runs on your Kubernetes cluster, listens for commands from Helm, and handles the configuration and deployment of software releases on the cluster. Find details on Helm and Tiller in Getting Started with Helm/Tiller in Kubernetes. Once you have successfully installed the Helm Client and Tiller, you can use Helm to manage the charts described in Step 4: Configure the CSI driver for Dell EMC .
The curl tool fetches a given URL from the command line in order to save a web file to the local client, or pipe it to another program. Use curl as shown below to install the Helm and Tiller package managers on the master node:
- Type this command:
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh
- Change permissions on the script.
chmod 700 get_helm.sh
- Run the script.
- Initialize Helm.
- Test the Helm installation.
- Set up a service account for Tiller.
- Create a rbac-config.yaml file and add the following content to the file:
- kind: ServiceAccount
- Create the service account.
kubectl create -f rbac-config.yaml
- Apply the service account to Tiller.
# helm init --upgrade --service-account tiller
Install the PowerFlex Storage Data Client
To install the PowerFlex Storage Data Client (SDC) on all Kubernetes nodes, follow these steps:
- Download the PowerFlex SDS from Dell EMC Online support. The filename is EMC-ScaleIO-sdc-3.0-1000.208.el7.x86_64.
- Export the MDM_IP in a comma-separated list. This list contains the IP addresses of the MDMs.
- On each Kubernetes node, use the following command to install the SDC.
#rpm -iv ./EMC-ScaleIO-sdc-3.0-1000.208.el7.x86_64.rpm
Install the CSI Driver for Dell EMC PowerFlex
The CSI Driver for Dell EMC PowerFlex facilitates Use Case 2 by providing the following features:
- Persistent volume (PV) capabilities - create, list, delete, and create-from-snapshot
- Dynamic and static PV provisioning
- Snapshot capabilities - create, delete, and list
- Supports the following access modes:
- Supports HELM charts installer
To install CSI the Driver for Dell EMC PowerFlex, follow these steps:
- Download the installation source files from github.com/dell/csi-vxflexos.
# git clone https://github.com/dell/csi-vxflexos
- Namespaces provide a way to divide cluster resources among multiple users. This step creates the vxflexos namespace within the Kubernetes cluster:
#kubectl create namespace vxflexos
- Create a Kubernetes secret with PowerFlex username and password. Use the secret.yaml file to create the secret with the following values to match the default installation parameters:
# set username to the base64 encoded username
# set password to the base64 encoded password
- Collect information from the PowerFlex Storage Data Client (SDC) by running the get_vxflexos_info.sh script located in the top-level helm directory. This script displays the PowerFlex system ID and MDM IP addresses.
- To customize settings for installation, copy the csi-vxflexos/values.yaml into a file in the same directory as the install.vxflexos named myvalues.yaml.
- Edit the myvalues.yaml file to set the following parameters for your installation.
- Set the systemName string variable to the PowerFlex system name or system ID. This value was obtained by running the get_vxflexos_info.sh script in Step 4 of this procedure.
- Set the restGateway string variable to the URL of your system’s REST API Gateway.
- Set the storagePool string variable to a default (already existing) storage pool name.
- Set the mdmIP string variable to a comma-separated list of MDM IP addresses.
- Set the volumeNamePrefix string variable so that volumes that are created by the driver have a default prefix. If one PowerFlex system is servicing several different Kubernetes installations or users, these prefixes help you distinguish them.
- Run the sh install.vxflexos command to proceed with the installation. When the script finishes running, it displays the status of the pods (by calling kubectl get pods -n vxflexos).