---
title: Cutting-Edge Container Data Storage on AWS Cloud
description: Cloud Volumes Service for AWS simplifies the deployment and management of persistent storage for use with containers.
image: https://cloud.netapp.com/hubfs/Cutting-Edge%20Storage%20for%20Container%20Technology%20Container%20Data%20Storage%20in%20CVS%20for%20AWS-Blog.png
---

![NetApp-Blue-logo-sm1](https://bluexp.netapp.com/hubfs/NetApp-Blue-logo-sm1.svg "NetApp-Blue-logo-sm1")

![hamburger icon](https://bluexp.netapp.com/hubfs/NetApp-Blue/hamburger-icon.svg) ![close icon](https://bluexp.netapp.com/hubfs/NetApp-Blue/close-icon.svg)

- Product
  
  ![left nav icons-1](https://bluexp.netapp.com/hubfs/left%20nav%20icons-1.svg)Storage 
    - [NetApp On-premises](https://bluexp.netapp.com/netapp-on-premises)
    - [Cloud Volumes ONTAP](https://bluexp.netapp.com/ontap-cloud)
    - [Amazon FSx for NetApp ONTAP](https://bluexp.netapp.com/fsx-for-ontap)
    - [Azure NetApp Files](https://bluexp.netapp.com/azure-netapp-files)
    - [Google Cloud NetApp Volumes](https://bluexp.netapp.com/google-cloud-netapp-volumes)
  
  
  ![data mobility](https://bluexp.netapp.com/hubfs/NetApp-Blue/data-mobility.svg)Mobility 
    - [Copy and Sync](https://bluexp.netapp.com/cloud-sync-service)
    - [Tiering](https://bluexp.netapp.com/cloud-tiering)
  
  
  ![left nav icons-2](https://bluexp.netapp.com/hubfs/left%20nav%20icons-2.svg)Protection 
    - [Backup and recovery](https://bluexp.netapp.com/cloud-backup)
    - [Disaster recovery](https://bluexp.netapp.com/disaster-recovery)
    - [Replication](https://bluexp.netapp.com/replication)
    - [Ransomware protection](https://bluexp.netapp.com/ransomware-protection)
  
  
  ![left nav icons](https://bluexp.netapp.com/hubfs/left%20nav%20icons.svg)Analysis and control 
    - [Observability](https://bluexp.netapp.com/cloud-insights)
    - [Classification](https://bluexp.netapp.com/netapp-cloud-data-sense)
    - [AIOps & storage health ](https://bluexp.netapp.com/digital-advisor)
    - [Digital wallet](https://bluexp.netapp.com/digital-wallet)
- Resources
  
    - ![solutions database](https://bluexp.netapp.com/hubfs/NetApp-Blue/solutions-protection.svg)CALCULATORS
    - [TCO Azure](https://bluexp.netapp.com/azure-calculator)
    - [TCO AWS](https://bluexp.netapp.com/aws-calculator)
    - [TCO Google Cloud](https://bluexp.netapp.com/google-cloud-calculator)
    - [Cloud Volumes ONTAP Sizer](https://bluexp.netapp.com/cvo-sizer)
    - ![resources explore](https://bluexp.netapp.com/hubfs/NetApp-Blue/resources-explore.svg)EXPLORE
    - [Global Availability Map](https://bluexp.netapp.com/cloud-volumes-global-regions)
- [Help Center](https://bluexp.netapp.com/help-center)

[Get Started](https://cloudmanager.netapp.com/)

# Cutting-Edge Storage for Container Technology: Container Data Storage in CVS for AWS

### Share

[![Facebook](https://bluexp.netapp.com/hubfs/Facebook.svg)](https://www.facebook.com/sharer.php?u=https://bluexp.netapp.com/blog/aws-kubernetes-cloud-container-data-storage-management) [![Twitter](https://bluexp.netapp.com/hubfs/Twitter.svg)](https://twitter.com/share?url=https://bluexp.netapp.com/blog/aws-kubernetes-cloud-container-data-storage-management) [![LinkedIn](https://bluexp.netapp.com/hubfs/linkedin-1.svg)](https://www.linkedin.com/shareArticle?mini=true&url=https://bluexp.netapp.com/blog/aws-kubernetes-cloud-container-data-storage-management)

### Subscribe to our blog

Thanks for subscribing to the blog.

### October 13, 2019

### Topics: [AWS](https://bluexp.netapp.com/blog/topic/aws)[6 minute read](https://bluexp.netapp.com/blog/topic/6-minute-read)

The popularity of containerized technology has been surging recently, and with it, the need for reliable persistent storage solutions. Stateful workloads that demand cost efficiency, high throughput, and high IOPS not only need reliability, but also a system that’s capable of running on top of containers and container orchestration platforms.

When using Cloud Volumes Service, you can easily provision persistent volumes directly from Docker and Kubernetes without the middleman (or, in this case, the middle application). It’s as simple as creating the volume to be exported and—using the Cloud Volumes Service UI or CLI —mounting it directly from either Kubernetes or Docker.

## **NFS Storage for Containers**

Both Docker and Kubernetes have volume plug-ins that use NFS as their storage file system. Those volumes can be mounted by multiple containers or pods simultaneously. This allows persistent data stored on the volumes to be used for the integrated functionalities of applications running on top of running sets of pods or containers.

[NetApp](https://bluexp.netapp.com/hubfs/Cloud_Volumes_for_AWS_Customer_FAQ_14_Dec_2018.pdf?hsCtaTracking=5a911984-7fe3-40a4-a517-ac6c5f59ee39%7C38edb88a-9376-4948-aa1f-b5dfd3e4c264)[Ⓡ](https://bluexp.netapp.com/hubfs/Cloud_Volumes_for_AWS_Customer_FAQ_14_Dec_2018.pdf?hsCtaTracking=5a911984-7fe3-40a4-a517-ac6c5f59ee39%7C38edb88a-9376-4948-aa1f-b5dfd3e4c264)[ Cloud Volumes Service for AWS](https://bluexp.netapp.com/hubfs/Cloud_Volumes_for_AWS_Customer_FAQ_14_Dec_2018.pdf?hsCtaTracking=5a911984-7fe3-40a4-a517-ac6c5f59ee39|38edb88a-9376-4948-aa1f-b5dfd3e4c264) provides an enterprise-grade solution for NFS storage in the cloud, while also easing the process of administering the storage stack. It allows you to address two problems at once by offering both high performance and ease of management. Everything you need is housed in the Cloud Volumes Service UI or CLI, where you can perform all the functions you need from a single site.

The Cloud Volumes Service UI is the key to efficient container data storage.

## **Accessing Cloud Volumes from Kubernetes**

Configuring access to a persistent NFS cloud volume exported by NetApp Cloud Volumes Service for AWS takes just two easy steps:

1. Create the volume using the Cloud Volumes Service UI
2. On your Kubernetes master host, you’ll configure a persistent volume, a persistent volume claim, and the pod resource that’s going to use the volume.

In the tutorial below, we show you how to access your cloud volumes from Kubernetes using a small open-source Kubernetes cluster deployment installed on top of two Amazon EC2 nodes running Ubuntu 18.04.

### **Creating a Cloud Volume from the Cloud Volumes Service UI**

Log into your[ Netapp Cloud Central](https://netapp-cloud-account.auth0.com/login?state=g6Fo2SBVLVVFOFRrZGZqM0tJb0ZVNUZSdWI0LWljbmN0ZW5QM6N0aWTZIHk3WTNVNmZzcHI2LUtjTzdfTGZGRkU1M0ZLeGFYS0F5o2NpZNkgUUMzQWdIazZxZGJtQzdZeXI4MkFwQndhYUpMd1JyTk8&client=QC3AgHk6qdbmC7Yyr82ApBwaaJLwRrNO&protocol=oaut) account and select the Cloud Volumes Service option:

![Cloud volumes service](https://bluexp.netapp.com/hs-fs/hubfs/1-15.png?width=600&name=1-15.png)

Create the new NFS volume to be exported and enter all the volume details and the export policy.

![Create New Volume](https://bluexp.netapp.com/hs-fs/hubfs/2-8077137.png?width=600&name=2-8077137.png)![Create New Volume next step](https://bluexp.netapp.com/hs-fs/hubfs/3-3671142.png?width=600&name=3-3671142.png)

Make note of the export path and server IP address.

![Server IP Address](https://bluexp.netapp.com/hs-fs/hubfs/4-8490717.png?width=600&name=4-8490717.png)

On the Cloud Volumes Service side, that’s all you have to do. Next, we have to complete the Kubernetes half of the setup.

### **Provisioning the Cloud Volume in Kubernetes**

Kubernetes has an API object implementation called the PersistentVolume subsystem. That API consists of two objects: PersistentVolume and PersistentVolumeClaim. The PersistentVolume is a unit of storage provisioned by an administrator. It has a lifecycle that is independent from the lifecycle of any pod associated with it. PersistentVolumeClaim is a request by a user for storage resources with some general characteristics, such as access modes and storage size.

Pods use these claims to request available persistent volumes. You can go more granular and create StorageClasses that let you specify the quality of service or backup policies. For the purposes of this walkthrough, we are going to create a PersistentVolume pointing to our NetApp Cloud Volumes Service for AWS export and then create a PersistentVolumeClaim to call for it, and finally, create a pod that will make use of the cloud volume.

We used the .yaml content below and created the PersistentVolume by applying the command kubectl apply -f /path/filename.yaml as shown below:

`apiVersion: v1 kind: PersistentVolume    metadata: name: nfspv spec:    capacity:      storage: 100Gi volumeMode: Filesystem accessModes:      - ReadWriteMany persistentVolumeReclaimPolicy: Retain storageClassName: netapppv mountOptions:    - hard    - nfsvers=3 nfs: path: /focused-ebullient-hofstadter server: 172.16.0.4`

![.yaml](https://bluexp.netapp.com/hs-fs/hubfs/5-4185361.png?width=600&name=5-4185361.png)

You can use a tool such as [Lint ](http://www.yamllint.com/)in order to validate indentation and syntax in your YAML file.

Once complete, verify that the volume was created and that its status is “Available”:

![Status Is Available](https://bluexp.netapp.com/hs-fs/hubfs/6-166777.png?width=600&name=6-166777.png)

NFS  
If you need any guidance for working with API object syntax, the Kubernetes project has documents available that you can refer to:

- [API Overview](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/)
- [API Conventions GitHub](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md)

Our next step is to create the PersistentVolumeClaim. We used the API call below in a .yaml file and applied the kubectl apply -f /path/filename.yaml command:

`apiVersion: v1 kind: PersistentVolumeClaim metadata:   name: netappclaim spec:   accessModes:    - ReadWriteMany   volumeMode: Filesystem   resources:    requests:     storage: 100Gi   storageClassName: netapppv`

![Storgae class name: Netapppv](https://bluexp.netapp.com/hs-fs/hubfs/7-6160208.png?width=600&name=7-6160208.png)

Notice the StorageClassName must be the same in both the PersistentVolume file and the PersistentVolumeClaim file so that they both can be bound by the Kubernetes service.

![Status: Bound](https://bluexp.netapp.com/hs-fs/hubfs/8-7831467.png?width=600&name=8-7831467.png)

![Volume: nfspv](https://bluexp.netapp.com/hs-fs/hubfs/9-2.png?width=600&name=9-2.png)

Now that the claim has been bound to the persistent volume, we can create a pod that uses that claim as its persistent storage by specifying the PersistentVolumeClaim name “netappclaim” in one of the pod’s API call attributes:

`kind: Pod apiVersion: v1 metadata:   name: hipod spec:   volumes:    - name: netappvol     persistentVolumeClaim:      claimName: netappclaim   containers:    - name: netapp-test     image: nginx     ports:      - containerPort: 80       name: "http-server"     volumeMounts:      - mountPath: ¨/tate/nfs¨      name: netappvol`

![Building dependency tree](https://bluexp.netapp.com/hs-fs/hubfs/10-2.png?width=600&name=10-2.png)

![netappclaim](https://bluexp.netapp.com/hs-fs/hubfs/11-3.png?width=600&name=11-3.png)

You need to install the NFS client on every node in the Kubernetes cluster before the pod can mount the exported cloud volume.

#### Testing the Configuration

Following the steps below, you can test the configuration:

1. First, create an index.html file on the mount path of the pod hipod
   
   ![Hello from NetApp](https://bluexp.netapp.com/hs-fs/hubfs/12-2.png?width=600&name=12-2.png)

1. Delete the pod from the Kubernetes cluster by applying the command kubectl delete pod hipod:
   
   ![hipod deleted](https://bluexp.netapp.com/hs-fs/hubfs/13-2.png?width=600&name=13-2.png)
2. Next, recreate the pod by using the same .yaml file shown before the configuration test and connect it to the volume again. You’ll now be able to confirm that the file is still there.  
   ![root@hipod](https://bluexp.netapp.com/hs-fs/hubfs/14-2.png?width=600&name=14-2.png)

 

## **Accessing Cloud Volumes from Docker**

Docker also has a volume driver that supports NFS for local and remote mounting, with no need for any other plugin to run in-between the two. Below, we show you how to create a single container, specifying all the volume information and mount details. This process also applies to the creation and mounting of a volume for a Docker service.

Create the container or service and specify all the mount information and mounting options.  

`docker run -d \   --name netapp \   --mount 'type=volume,source=cvs,target=/usr/share/nginx/html,volume-driver=local,volume-opt=type=nfs,volume- opt=device=:/focused-ebullient-hofstadter,"volume-opt=o=addr=172.16.0.4,rw,nfsvers=3"' \   nginx:latest`

The command above creates an nginx container with the name netapp which mounts the volume named cvsvolume to the internal container’s /usr/share/nginx/html path. It specifies the NFS NetApp server path as :/focused-ebullient-hofstadter and the IP address 172.16.0.4, both of which can be obtained from the export path in the Cloud Volumes Service UI or CLI for that particular volume:

![Service UI or CLI](https://bluexp.netapp.com/hs-fs/hubfs/15-1.png?width=600&name=15-1.png)

The first mount section from the docker inspect netapp command output confirms that the volume has been mounted to the desired NFS server.

![Mounts](https://bluexp.netapp.com/hs-fs/hubfs/16-1.png?width=600&name=16-1.png)

We can also verify this by following these two steps:

1. Access the container’s shell using the docker exec -it netapp /bin/bash command.
2. Navigate to the container’s path where the volume has been mounted:

cd /usr/share/nginx/html

![index.html file](https://bluexp.netapp.com/hs-fs/hubfs/17-1.png?width=600&name=17-1.png)

In the image above, we’re able to see the previous index.html file created when first mounting the cloud volume to our Kubernetes pod and an additional index2.html file created for this container. We then delete the container, remove the cvsvolume, and create a new container called netapp2, pairing it to the same volume.

![mount type = volume](https://bluexp.netapp.com/hs-fs/hubfs/18-1.png?width=600&name=18-1.png)

Again, we browse to the /usr/share/nginx/html path in order to confirm that the files previously created are still there.

![rw-r--r](https://bluexp.netapp.com/hs-fs/hubfs/19-1.png?width=600&name=19-1.png)

As you can see, it’s a simple process, but if you haven’t worked with Docker that much, you may want to reference the [Docker docs](https://docs.docker.com/storage/volumes/), where you’ll get very detailed and clear information about everything related to Docker. You can also visit the [Linux Manual pages](http://man7.org/linux/man-pages/man8/mount.8.html) for detailed information about the mount and NFS options.

## **Cutting-edge Container Tech Deserves Cutting-edge Storage**

Containers are the future, but they still rely on a solid storage utility for stateful workloads. Cloud Volumes Service for AWS provides a storage option that has been [tested against highly demanding workloads](https://bluexp.netapp.com/hubfs/TR-4761-Internet-of-DNA-Cloud-Enabled%5B1%5D.pdf) with very strong results. And since both Kubernetes and Docker have internal volume drivers that allow containerized data to persist on cloud volumes, this cutting edge technology finally has cloud-based storage to match.

### **Get Started With Cloud Volumes Service **

[Request a demo](https://www.netapp.com/us/forms/campaign/register-for-netapp-cloud-volumes-for-aws-demo.aspx?hsCtaTracking=07d8185b-d10d-42f3-bdc9-e83d07cd9665%7C42346d9e-766e-4716-807d-8b8372ccb03f) or visit [Cloud Volume Service for AWS ](https://bluexp.netapp.com/fsx-for-ontap)to find out more.

[Prabu Arjunan](https://bluexp.netapp.com/blog/author/prabu-arjunan-solution-architect)

### Solution Architect

<https://bluexp.netapp.com/blog/author/prabu-arjunan-solution-architect>

-

```json
{
  "@context" : "https://schema.org",
  "@type" : "TechArticle",
  "author" : {
    "@type" : "Person",
    "name" : "Prabu Arjunan, Solution Architect"
  },
  "dateModified" : "Oct 13, 2019 12:54:22 AM",
  "datePublished" : "Oct 13, 2019 12:54:22 AM",
  "description" : "Cloud Volumes Service for AWS simplifies the deployment and management of persistent storage for use with containers.",
  "headline" : " Cutting-Edge Storage for Container Technology: Container Data Storage in CVS for AWS ",
  "image" : [ "https://cloud.netapp.com/hubfs/Cutting-Edge%20Storage%20for%20Container%20Technology%20Container%20Data%20Storage%20in%20CVS%20for%20AWS-Blog.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://bluexp.netapp.com/blog",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://bluexp.netapp.com/hubfs/2016_dev/netapp-logo.png"
    },
    "name" : "Netapp"
  }
}
```