...

/

Defining Storage Classes

Defining Storage Classes

Learn how to define our own StorageClass.

Even though kops created two StorageClasses, both are based on gp2. While that is the most commonly used EBS type, we might want to create volumes based on one of the other three options offered by AWS.

User-defined storage classes

Let’s say that we want the fastest EBS volume type for our Jenkins. That would be io1. Since kOps did not create a StorageClass of that type, we might want to create our own.

Looking into the definition

YAML file that creates StorageClass based on EBS io1 is defined in pv/sc.yml. Let’s take a quick look.

Press + to interact
cat pv/sc.yml

The output is as follows:

Press + to interact
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: fast
labels:
type: ebs
provisioner: kubernetes.io/aws-ebs
parameters:
type: type: io1 # https://aws.amazon.com/ebs/details/ > Amazon EBS Volume Types
reclaimPolicy: Delete

We use kubernetes.io/aws-ebs as the provisioner. It is a mandatory field that determines the plugin that will be ...