In a containerized environment, you need persistent volumes . With HyperFlex 4.5, iSCSI thisis possible. What are the difference between using iSCSI or CSI in a container. Information about Kubernetes Persistent Volumes can be found HERE.
iSCSI can only do: ReadWriteOnce and ReadOnlyMany.
HX-CSI can do both AND also ReadWriteMany. (Block)
There is a very nice installation guide of the HyperFlex CSI, which can be found HERE. I am always learning with hands-on and here is my way of installing the HyperFlex CSI Plugin.
How to configure a Kubernetes cluster can be found HERE.
HyperFlex iSCSI Configuration
Before you can install HX-CSI, HyperFlex iSCSI network must be configured. In the HyperFlex iSCSI Video Serie there is a video with the explanation how it’s working and how to configure it. Please watch those videos before proceeding any further.
Installation of HX-CSI
After the installation of Kubernetes Master, Workers and the HX iSCSI Network Configuration, it is time to install HX-CSI. Download the plugin at www.cisco.com/go/software
Make sure node.session.scan = manual in the /etc/iscsi/iscsid.conf
sudo cat /etc/iscsi/iscsid.conf | grep -i node.session.scan
If it’s not in the file, you will have to put this parameter in the file.
To append this parameter when it’s not in the file:
sudo bash -c 'echo "node.session.scan = manual" >> /etc/iscsi/iscsid.conf'
iscsid.conf is a root owned file and to append the echo command, use bash in the command.
If the parameter is set to auto, you can change it, with verification via the command:
sudo vim -c '%s/node.session.scan = auto/node.session.scan = manual/gc' -c 'wq' /etc/iscsi/iscsid.conf
Enable iscsid and view the status to verify it’s running
sudo systemctl enable iscsid sudo systemctl status iscsid
Verify if present at the Kubernetes Master Image: –disable-attach-detach-reconcile-sync=true
sudo cat /etc/kubernetes/manifests/kube-controller-manager.yaml | grep -i reconcile
Add it at the command section of the file.
sudo vim /etc/kubernetes/manifests/kube-controller-manager.yaml
Download the HXCSI software from CCO and upload it to the K8S master in the /tmp directory. This can be done via SCP, WinSCP etc.
Extract the image with tar-xf <image name>. New directories will be created.
Copy the HXCSI Image to all workers nodes:
scp ./images/hxcsi-1.2.rel.4.5.1a.569.git.cc5ea579.tar 10.2.12.226:/tmp
Copy all the CSI images to the ALL Kubernetes nodes. I prefer to have those images also been copied to the /tmp of the Master node.
scp ./images/csi* 10.2.12.226:/tmp
On the Kubernetes Worker Nodes, load the HXCSI Image:
sudo docker load – input /tmp/hxcsi-1.2.rel.4.5.1a.569.git.cc5ea579.tar
Now docker load all the other 4 CSI images on ALL kubernetes nodes :
ls -1 /tmp/csi*.tar | xargs – no-run-if-empty -L 1 sudo docker load -i
Here are the final steps for the HX-CSI and lets start with the HXCSI-Setup. This file do have a lot of parameters.
Usage of ./setup/hxcsi-setup: -clientId string Client ID for the Tenant -cluster-name string k8s cluster name -helm-chart generate helm chart for helm install -hx-csi-image string HX csi image for the node plugin (default "smitsh/hxcsi:latest") -iscsi-url string hx iscsiUrlurl -output-dir string Output directory (default "./hxcsi-deploy/") -password string password to hx cluster api -token string Service Authentication Token -url string hx api url -username stringcc5ea579 user name to hx cluster api
Depending of your configuration, but here is an example of what I used:
./tmp/setup/hxcsi-setup -clientId IAmJoost -cluster-name jvdmadecluster -hx-csi-image -hx-csi-image hxcsi:1.2.rel.4.5.1a.569.git.cc5ea579 -iscsi-url 10.22.24.13 -url 10.2.12.13 -username admin
A hxcsi-deploy directory will be created with this content:
Deploy HX-CSI with the command:
kubectl create -f /tmp/hxcsi-deploy/
kubectl get pods
And that is it! HX-CSI is now installed and can be used.
FREE: Example Directory with Scripts
In the Example Director of the HX-CSI plugin, there are a lot of examples.
kubectl create -f /tmp/examples/sample-hxcsi/
Connect to the Containers bash to see how the volume is mount to the container:
kubectl exec -ti test-647b4c8874-l5g5d – /bin/bash
The Persistant Volume is, in this case, mounted on the /usr/mnt/test directory. If you write data to it, delete the container, start a new container and link it to this PVC, you still will see the data.
A WordPress Site with HyperFlex CSI
If you want to have a wordpress running in a container, please have a look at the following post:
Here are some more HyperFlex / Technical posts:
- Barocco MD770 Keyboard MacrosFor a year I was using a Koolertron Split Keyboard and I was pretty happy about it. The biggest disadvantage was the arrow keys, but those I didn’t use it often. Now I have the Barocco MD770 Suddenly my right keyboard thought it was a left keyboard and all the keys were wrong. Trying to
- HX-CSI ReadWriteMany Block Device ExampleSpecialized applications can need to read/write directly to a block device. The main use case are databases. A filesystem is more “human-readable” and it adds extra overhead. Instead of the filesystem, block devices are chosen more often. More information about Kubernetes can be found HERE. After the installation of Kubernetes and the HyperFlex Container Storage
- HyperFlex 4.5 Container Storage Interface (HX-CSI) InstallationIn a containerized environment, you need persistent volumes . With HyperFlex 4.5, iSCSI thisis possible. What are the difference between using iSCSI or CSI in a container. Information about Kubernetes Persistent Volumes can be found HERE. iSCSI can only do: ReadWriteOnce and ReadOnlyMany. HX-CSI can do both AND also ReadWriteMany. (Block) There is a very
- Kubernetes Installation.For the HyperFlex Container Storage Interface (HX-CSI) you will need a Kubernetes cluster. Here is the start of an image that have the right software on it and which you can clone before configuring Kubernetes. Start with a normal Ubuntu 18.04 installation. I just want to have certain versions of software and that is why
- Cutting MP4 Into smaller Files.To make some awesome videos, I’m using my GoPro Hero8 with 2K7 (2704×1520) resolution. This is because I’m using a green screen and although the end videos are in FullHD, with this resolution I can easily crop, resize parts of the video without losing any quality. Cutting MP4 into smaller files would make life easier.