https://pulumi.com logo
#kubernetes
Title
# kubernetes
n

numerous-leather-71223

12/22/2023, 1:02 AM
Greetings Folks - I'm trying to setup a new default StorageClass on a new EKS cluster and I'm trying to find a way to remove the old EKS default of
gp2
with Pulumi. This step is rather important for a lot of my automation in this stack because I don't want volumes on gp2. I didn't see much in terms of best practices. Can I just Delete the storage class? Does that need to be wrapped in some sort of check for subsequent
pulumi up
runs? Any suggestions?
e

echoing-fall-59017

12/24/2023, 9:22 AM
You are able to create one with a different type of storage, like
gp3
and make it the default if you wish, by specifying this annotation:
Copy code
storageclass.kubernetes.io/is-default-class: 'true'
when creating the new StorageClass https://www.pulumi.com/registry/packages/kubernetes/api-docs/storage/v1/storageclass/
n

numerous-leather-71223

12/26/2023, 6:12 PM
I have done that, but the issue is that then there are two defaults. Also I do not want users to have access to gp2 storage, hence trying to delete it.
s

steep-toddler-94095

12/26/2023, 10:58 PM
EKS creates the storage class separately from Pulumi. Because of this, Pulumi's state is not aware of it so you are free to delete it however you want
2 Views