Difficulty: Beginner
Estimated Time: 5-60 minutes

This sandbox environment is a fully configured one node Kubernetes cluster.

In this tutorial, you will install StorageOS, create a StorageClass and use it to claim a persistent volume.

StorageOS and Kubernetes

Step 1 of 2

Dynamic provisioning

In this tutorial, we'll look at how you dynamically provision storage using StorageOS.

First we need to set the environment variables that allow us to connect to the StorageOS cluster. export STORAGEOS_USERNAME=storageos STORAGEOS_PASSWORD=storageos STORAGEOS_HOST=[[HOST2_IP]]

Verify that you have a healthy installation with one worker node, node01: storageos node ls

Now an administrator can create a Storage Class to describe the storage that can be provisioned.

Encode the api address of the worker node in a secret:

APIADDRESS=$(echo -n "tcp://[[HOST2_IP]]:5705" | base64); sed -i "s/REPLACE/$APIADDRESS/g" storageos-secret.yaml

kubectl create -f storageos-secret.yaml

Create fast StorageClass:

kubectl create -f storageos-storageclass.yaml

The fast StorageClass should be backed by the kubernetes.io/storageos provisioner:

kubectl describe storageclass