Eksctl: Add Support for Auto-Deploying a Default Storage Class

Created on 28 Aug 2018  路  8Comments  路  Source: weaveworks/eksctl

Before creating a feature request, please search existing feature requests to see if you find a similar one. If there is a similar feature request please up-vote it and/or add your comments to it instead

Why do you want this feature?
To ease the setup of EKS cluster for production usecases

What feature/behavior/change do you want?
When #132 gets merged if we have the possibility it would be nice to add an option to auto deploy a storageclass and make it the default.

The manifest that would need to be applied would be:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: gp2
  annotations:
    "storageclass.kubernetes.io/is-default-class": "true"
provisioner: kubernetes.io/aws-ebs
parameters:
  type: gp2
reclaimPolicy: Retain
mountOptions:
  - debug
good first issue help wanted kinfeature

All 8 comments

@christopherhein yes, more then happy to do it! Could you please clarify the #321 reference, which repo is it for?

LOL, sorry about that I flipped that entirely, I meant #132 updating the above comment to reflect. Sorry about that.

I'm hoping we can reuse some of the addon work to deploy this.

Hey @christopherhein !
I'm hoping to be a new collaborator from the EKS team and help out with this. But I brought it up to my team, and was wondering if you could clarify what the use case for this would be.

As I understand it, this would allow an end user to create a cluster, and not have to run the kubectl create -f <storage-class.yaml> command. Is that correct? The question that came up was regarding the responsibility of deciding what type of storage class to make default. Would allowing the user to skip this command make it more difficult for any user that may not want to use the chosen default storage class for their respective applications?

My apologies if I'm misunderstanding the concept. We can take this offline and discuss if you'd like.
Thanks for your help!

Hey @karinnainiguez, it shouldn't be set as a default with all eksctl clusters, what I'm hoping for is similar to what we have with --full-ecr-access have --gp2-storage-class or have --storage-class=gp2 the latter only if we think that we'd ever have a way to set anything other than gp2 by default.

The real benefit is not having to configure your storage class if you are trying to get up and running quickly and be able to use PVs without having to write or go find this manifest file.

Thank you so much @christopherhein! I really appreciate the clarification.

I think you're asking for eksctl cli support for storage class and type creation at the time that the eks create cluster is triggered. Is that correct?

So, all four options (gp2, io1, st1, and sc1) should be available to users during creation.
Let me know if I'm capturing that correctly.
Thanks!

You got the ask correct! 馃憤

And good point there are multiple types of storage classes under the ebs provisioner, and we should support them all so --storage-class=<type> would be the right approach.

I sumbled upon this thread today (w/ @andscoop, @bonominijl) after trying to helm install ... stable/postgresql on my EKS cluster created with eksctl. Instead of becoming active, it stays in status pending. I think the storage class issue is why but haven't found logs to confirm yet.

It looks like #132 was merged recently. Given that, what's the status of this PR?


Here's the solution I'm using currently:

  1. Create storage-class.yaml:

    kind: StorageClass
    apiVersion: storage.k8s.io/v1
    metadata:
      name: gp2
      annotations:
        storageclass.kubernetes.io/is-default-class: "true"
    provisioner: kubernetes.io/aws-ebs
    parameters:
      type: gp2
    reclaimPolicy: Retain
    mountOptions:
      - debug
    

    _Note 1 : This was created based on the example in the EKS Storage Classes docs. It matches the yaml file at the top of the issue aside from not having quotes on the storage class key._

    _Note 2: I'm not sure why Amazon applied the default annotation after the fact vs putting it in the yaml file... but including it in the file as a default makes more sense to me too._

  2. Create it:

    $ kubectl create -f storage-class.yaml
    storageclass.storage.k8s.io/gp2 created
    $ kubectl get storageclass
    NAME            PROVISIONER             AGE
    gp2 (default)   kubernetes.io/aws-ebs   4s
    

Hey @tedmiston!

I just submitted a pr for this feature: https://github.com/weaveworks/eksctl/pull/224
Feel free to leave any feedback you'd like me to incorporate.

Thanks, and have a great rest of your day!

Was this page helpful?
0 / 5 - 0 ratings