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: StorageClassapiVersion: storage.k8s.io/v1metadata:name: fastlabels:type: ebsprovisioner: kubernetes.io/aws-ebsparameters:type: type: io1 # https://aws.amazon.com/ebs/details/ > Amazon EBS Volume TypesreclaimPolicy: Delete
We use kubernetes.io/aws-ebs
as the provisioner
. It is a mandatory field that determines the plugin that will be ...