Home > Storage > PowerFlex > White Papers > Oracle in Docker Containers Managed by Kubernetes > Step 4: Configure the CSI driver for Dell EMC PowerFlex
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:
Then complete the following tasks (defined in detail in the following sections) for configuring the CSI Driver:
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:
VolumeSnapshotDataSource: true
vi /etc/kubernetes/manifests/kube-apiserver.yaml
Append the following line to the kube-apiserver.yaml file
- --feature-gates=VolumeSnapshotDataSource=true
vi /etc/kubernetes/manifests/kube-controller-manager.yaml
Append following line to the kube-controller-manager.yaml file:
- --feature-gates=VolumeSnapshotDataSource=true
vi /etc/kubernetes/manifests/kube-scheduler.yaml
Append the following line to the kube-scheduler.yaml file:
- --feature-gates=VolumeSnapshotDataSource=true
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --feature-gates=VolumeSnapshotDataSource=true"
systemctl daemon-reload
systemctl restart kubelet
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.
Docker.service
[Service]
…
MountFlags=shared
systemctl daemon-reload
systemctl restart docker
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:
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh
helm init
helm version
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: tiller-clusterrolebinding
subjects:
- kind: ServiceAccount
name: tiller
namespace: kube-system
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: ""
kubectl create -f rbac-config.yaml
# helm init --upgrade --service-account tiller
To install the PowerFlex Storage Data Client (SDC) on all Kubernetes nodes, follow these steps:
export MDM_IP=192.168.152.25,192.168.160.25
#rpm -iv ./EMC-ScaleIO-sdc-3.0-1000.208.el7.x86_64.rpm
The CSI Driver for Dell EMC PowerFlex facilitates Use Case 2 by providing the following features:
To install CSI the Driver for Dell EMC PowerFlex, follow these steps:
# git clone https://github.com/dell/csi-vxflexos
#kubectl create namespace vxflexos
Name: vxflexos-creds
Namespace: vxflexos
apiVersion: v1
kind: Secret
metadata:
name: vxflexos-creds
namespace: vxflexos
type: Opaque
data:
# set username to the base64 encoded username
username: YWRtaW4=
# set password to the base64 encoded password
password: QFZhbnRhZ2U0
systemName: 31846a6a738a010f
restGateway: https://10.230.87.31
storagePool: R640_SP2
mdmIP: 192.168.152.25,192.168.160.25
volumeNamePrefix: k8s