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.

Don’t stop now! The next scenario will only take about 10 minutes to complete.

StorageOS and Kubernetes

Deploy StorageOS and provision storage

Verify that you have a master and a worker node (node01) running:

kubectl get nodes

Create daemonset:

kubectl apply -f storageos-daemonset.yaml

Check that Kubernetes has started the StorageOS pod:

kubectl get pods

Encode the api address and create 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 kubectl get storageclass

Create PersistentVolumeClaim which references the fast StorageClass:

kubectl create -f storageos-pvc.yaml kubectl get pvc

Create a Redis pod which references fast0001:

kubectl create -f storageos-pod.yaml kubectl get pv

============================================================

Alternatively, you can apply all files at once (you will still need to encode the API address above):

kubectl apply -f storageos-pvc.yaml -f storageos-pod.yaml -f storageos-secret.yaml -f storageos-storageclass.yaml