This article belongs to a #HowDoI series on Kubernetes and Litmus

Ever so often, developers and devops engineers building or managing stateful applications on Kubernetes are on the lookout for for suitable storage options which serves their application’s specific needs. The emphasis could be on high-availability, provisioning ease, performance etc.., Litmus (as detailed in this article), is an attempt to arm them with the necessary info to make the right choice. One of the important storage tests is to simulate application workloads or multiply its effect using synthetic workload generators like fio. In this article, we list the steps to run a fio-based benchmark test using litmus

Evaluating storage performance w/ Litmus

PRE-REQUISITES

At least a single-node Kubernetes cluster with the necessary disk resources, mounted on the node. ( Note : Certain storage solutions need minimum Kubernetes versions from which they are supported. For ex: Local PVs are beta from 1.10, OpenEBS needs 1.7.5+)

: Certain storage solutions need minimum Kubernetes versions from which they are supported. For ex: Local PVs are beta from 1.10, OpenEBS needs 1.7.5+) Storage operator installed (typically, this includes control-plane elements like the static/dynamic provisioners, storage classes and other elements) with appropriate references to the node & disk resources (For example: This may involve storage pool creation OR updating disk and node details in the static provisioners etc.,)

STEP-1: Setup Litmus essentials on the Kubernetes cluster

Obtain the Litmus Git repository via a Git Clone operation on the Kubernetes master/Control machine used to manage cluster & set up the Litmus namespace, service account & clusterrolebinding by applying rbac.yaml

karthik_s@cloudshell:~ (strong-eon-153112)$ git clone https://github.com/openebs/litmus.git

Cloning into 'litmus'...

remote: Counting objects: 2627, done.

remote: Compressing objects: 100% (16/16), done.

remote: Total 2627 (delta 2), reused 9 (delta 2), pack-reused 2609

Receiving objects: 100% (2627/2627), 10.50 MiB | 4.23 MiB/s, done.

Resolving deltas: 100% (740/740), done. karthik_s@cloudshell:~ (strong-eon-153112)$ cd litmus/ karthik_s@cloudshell:~/litmus (strong-eon-153112)$ kubectl apply -f hack/rbac.yaml

namespace "litmus" created

serviceaccount "litmus" created

clusterrole "litmus" created

clusterrolebinding "litmus" created

Create a configmap resource out of the cluster’s config file, typically at ~/.kube/config, /etc/kubernetes/admin.conf or elsewhere depending on the type of cluster or setup method (Note: Copy the config file to admin.conf before creating the configmap out of it, as the litmus job expects this path)

karthik_s@cloudshell:~ (strong-eon-153112)$ kubectl create configmap kubeconfig --from-file=admin.conf -n litmus

configmap "kubeconfig" created

STEP-2: Update the Litmus test job as per need

The litmus fio test job allows the developer to…

Read the complete article in MayaData’s Blog.