The CSI specification 1.0 is GA since kubernetes release 1.13 but disabled by default.
In the following video, we will show how to enable it on our three nodes cluster with one master (k8s-master) and two minions(k8s-minion-1 & k8s-minion-2).
To enable the driver there are 3 main steps :
-
On every nodes, configure kubelet service to use CSI with:
/var/lib/kubelet/config.yaml
VolumeSnapshotDataSource: true KubeletPluginsWatcher: true CSINodeInfo: true CSIDriverRegistry: true BlockVolume: true CSIBlockVolume: true
- and
/etc/systemd/system/kubelet.service.d/10-kubeadm.conf
:
--allow-privileged=true --feature-gates=VolumeSnapshotDataSource=true,KubeletPluginsWatcher=true,CSINodeInfo=true,CSIDriverRegistry=true,BlockVolume=true,CSIBlockVolume=true
-
On every nodes, configure docker service (
/etc/systemd/system/multi-user.target.wants/docker.service
)to useMountFlags=shared
-
On master node, configure
/etc/kubernetes/manifests/kube-apiserver.yaml
,/etc/kubernetes/manifests/kube-controller-manager.yaml
, and/etc/kubernetes/manifests/kube-scheduler.yaml
to use the CSI flags- --feature-gates=VolumeSnapshotDataSource=true,KubeletPluginsWatcher=true,CSINodeInfo=true,CSIDriverRegistry=true,BlockVolume=true,CSIBlockVolume=true
For detailed configuration, you can refer to the official CSI documentation
Soon
In that demo we use CrunchyData PosgreSQL distribution which provides native High Availability configuration.
The modifications made to the original helm chart are :
- vxflexos as default storage class
- A new service NodePort (TCP 31432) to ease connection to the DB from external world
- A bigger default pvc to be consistent with VxFlexOS requirements
For more documentation on pod setup and the configuration you can do, please refer to : https://crunchydata.github.io/crunchy-containers/stable/container-specifications/crunchy-postgres/
Soon
Soon