Hello team, I am wondering if we have some way cre...
# kubernetes
m
Hello team, I am wondering if we have some way creating an temporary external storage, like EBS in AWS, attach it as a volume, run some Tekton tasks and drop it, in a pulumi way?
I see we could create them easily in pulumi, but I have no idea how to remove them using pulumi.
m
To remove the volume, you delete the volume resource from your Pulumi program and run
pulumi up
again. Unless you've configured a deletion protection of some sorts, this will delete the volume on AWS. (Note that an EBS volume can only be deleted if it isn't attached to an instance.) That said, Pulumi might not be a good fit for your use case. It sounds like you're not managing infrastructure but have a process that you're running repeatedly (create a temporary volume, do something, maybe do something else, delete the temporary volume). In this case, a boto3 script you run as a k8s Job or AWS Step Functions seem to be more suitable tools. If you're operating everything within Kubernetes, you shouldn't even have to think about EBS. If your cluster is configured with the EBS CSI driver, you can request a volume for your Pod. If you just need a scratch space, you can use an emptyDir volume.
m
Thanks a lot for the help. I think it makes sense to use a script to setup the process.