VOOZH about

URL: https://thenewstack.io/tutorial-install-and-configure-openebs-on-amazon-elastic-kubernetes-service/

⇱ Tutorial: Install and Configure OpenEBS on Amazon Elastic Kubernetes Service - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2020-03-13 09:47:48
Tutorial: Install and Configure OpenEBS on Amazon Elastic Kubernetes Service
feature,tutorial,
Cloud Native Ecosystem / Kubernetes / Storage

Tutorial: Install and Configure OpenEBS on Amazon Elastic Kubernetes Service

In this part, we will install and configure OpenEBS on the Amazon Elastic Kubernetes Service (EKS),  with a focus on the cStor Storage Engine.
Mar 13th, 2020 9:47am by Janakiram MSV
👁 Featued image for: Tutorial: Install and Configure OpenEBS on Amazon Elastic Kubernetes Service

In a previous article, I introduced the architecture of the OpenEBS, an open source container attached storage package for Kubernetes. In this part, we will install and configure OpenEBS on the Amazon Elastic Kubernetes Service (EKS),  with a focus on the cStor Storage Engine.

By the end of this tutorial, you will have a storage pool that can be used for deploying highly available stateful workloads on Kubernetes.

Launching an Amazon EKS Cluster

The first step is to provision an Amazon EKS cluster with three nodes. Download and configure eksctl, the nifty tool to manage EKS clusters.

eksctl create cluster \
 --name openebs-demo \
 --version 1.14 \
 --nodegroup-name ng-workers \
 --node-type t3.medium \
 --nodes 3 \
 --nodes-min 3 \
 --nodes-max 6 \
 --node-ami auto \
 --node-ami-family Ubuntu1804 \
 --set-kubeconfig-context=true
kubectl get nodes

👁 Image

Attaching Amazon EBS Volumes to Worker Nodes

OpenEBS cStor storage engine creates a pool from attached block storage devices.

If you have a large cluster, you can label a subset of nodes for running stateful workloads and configure OpenEBS on the nodes.

Let’s create and attach an EBS volume to each node of the cluster. Before that, we need to get the Amazon EC2 instance id and availability zone of the worker nodes.

aws ec2 describe-instances \
 --query 'Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0], InstanceId, Placement.AvailabilityZone]' \
 --output text

👁 Image

aws ec2 create-volume \
 --size 20 \
 --availability-zone ap-south-1a \

👁 Image

Note the volume id of the EBS device. We need it for the next step where we attach the volume to an instance from the same availability zone.

aws ec2 attach-volume \
	--volume-id vol-035af55d5b38f441c \
	--instance-id i-09f1e8c7fae5c7c24 \
	--device /dev/sdf

👁 Image

Repeat these steps for the remaining two nodes of the cluster. Make sure that the availability zone is the same for the EBS volume and EC2 instance (worker node).

By the end of this step, we have three EBS volumes of 20GiB each attached to the worker nodes.

Verify that the volumes are attached to the nodes with the below command:

aws ec2 describe-instances \
	--query 'Reservations[*].Instances[*].[Tags[?Key==`Name`].Value,InstanceId,BlockDeviceMappings[*].Ebs.VolumeId]' \
	--output text

👁 Image

The first volume is the root while the second volume is the disk that we attached.

Note: The steps involved in creating and attaching volumes to worker nodes can be easily automated through a BASH script or an AWS CloudFormation template.

Installing OpenEBS

We will use the OpenEBS operator to install it. This will create a dedicated namespace and deploys OpenEBS.

kubectl apply -f https://openebs.github.io/charts/openebs-operator.yaml

Wait for the Pods to become ready before proceeding to the next step.

kubectl get pod -n openebs

👁 Image

The next step is to initialize Ubuntu to ensure that iSCSI service is up and running.

kubectl apply -f https://openebs.github.io/charts/openebs-ubuntu-setup.yaml

👁 Image

The last line confirms that iSCSI is initialized.

Configuring cStor Storage Engine on OpenEBS

With OpenEBS in place, we will now configure a storage engine based on cStor which will create a storage pool from the attached EBS volumes.

Let’s start by getting the block device id associated with the EBS volumes.

kubectl get blockdevice -n openebs

👁 Image

From these raw devices, we will now create a cStor storage pool. Add the list of block devices to the below YAML file and apply it.

apiVersion: openebs.io/v1alpha1
kind: StoragePoolClaim
metadata:
 name: cstor-disk-pool
 annotations:
 cas.openebs.io/config: |
 - name: PoolResourceRequests
 value: |-
 memory: 2Gi
 - name: PoolResourceLimits
 value: |-
 memory: 4Gi
spec:
 name: cstor-disk-pool
 type: disk
 poolSpec:
 poolType: striped
 blockDevices:
 blockDeviceList:
 - blockdevice-371f31f8dad830daa7fc90123779fc5d
 - blockdevice-5f112c01babaa05438b796f545613cd1
 - blockdevice-aadb62b32b1be2d1113698ceeab8a6ee

This step can be easily automated through a BASH script by reading the output of the kubectl command listing the block devices and adding them to the YAML file.

kubectl apply -f cstor-pool-config.yaml 

Let’s check the storage pool claim.

kubectl get spc

👁 Image

Finally, we will verify that the cStor storage pool is created and ready for use.

kubectl get csp

👁 Image

Congratulations! You are now ready to deploy stateful workloads backed by OpenEBS.

In the next part of this tutorial, I will walk you through the steps involved in deploying a highly available instance of PostgreSQL backed by OpenEBS cStor storage engine. Stay tuned!

Janakiram MSV’s Webinar series, “Machine Intelligence and Modern Infrastructure (MI2)” offers informative and insightful sessions covering cutting-edge technologies. Sign up for the upcoming MI2 webinar at http://mi2.live.

Amazon Web Services is a sponsor of The New Stack.

Feature image via Pixabay.

TRENDING STORIES
Janakiram MSV (Jani) is a practicing architect, research analyst, and advisor to Silicon Valley startups. He focuses on the convergence of modern infrastructure powered by cloud-native technology and machine intelligence driven by generative AI. Before becoming an entrepreneur, he spent...
Read more from Janakiram MSV
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.