Storage: On AWS & k8s

Mansi Dadheech
4 min readJun 20, 2020

--

Using storage devices we can store our data persistently and we have three kind of storage .

Block Storage:
We use block storage if we have requirement:
* To attach extra hard disk.
* To create partition.
* To install OS.

Drawbacks:
- We can’t attach same volume to multiple OS.

Object Storage:
We can use one storage for multiple OS parallelly.
Drawbacks:
- We can’t edit files , for editing we have to attach them first with OS.

When we run any program first it loads on RAM. But if file size is in Tb then it loads on RAM frame by frame. And this capability only achieve when we have file system.File system knows every part of the file which provides continuous linking.

To solve the above issue we need:

  • Centralized Storage: So that multiple OS can mount it parallelly and store data permanently.
  • File System.

File Storage:
Storage that can be link with multiple operating system and have filesystem so that we can edit files.

Network File System (NFS) : Protocol to transfer data from one system to another through network.
* NFS Server: They share their storage through network. We can’t touch device directly for using this storage we have to create a folder and expose it.
* Client: client can mount that folder in his system for using storage.

It looks like a local file system but it come from centralized storage.
Unit which shares the storage via NFS known as NAS.

Different cloud services for different storage:

EFS Elastic File System:

Amazon service to provide file storage.
Mount Target: NFS server is known as mount target.
It works per region.
We create NFS server in all availability zone of a region . Client always contacts to NFS and behind the scene NFS gets data from all availability zone.

Creating File System in AWS:

Choose EFS service.

Before going for file system, create security group to allow NFS.

Now go to EFS and create File System:

We have to add security group that we have created to allow nfs:

To attach it to OS we launch two operating system and while launching instance we add file system to it

After attaching file system whatever file we create in /var/www/html folder it will reflect in both instances as they both are mounted to file system.

Hypervisors: It is a program which create virtual machines on baseOS.
AWS uses Xen hypervisor.

Introduction to PVC:

While installing VM OS either we use local hard disk or SAN(storage as network). On Local system storage is ephemeral, we lose our data after OS termination.
Pods get storage from local system i.e. ephemeral storage system.
To create centralized storage for making data permanent. We use a kubernetes service- PVC(Persistent Volume Claim) .

Thanks to Vimal Sir and thanks for reading!!

--

--

Mansi Dadheech

Exploring various disciplines to broaden my own pursuits✨.