I have an ECK 1.3.1 deployed in AWS EKS. In my elastic.yml I have specified a volumeClaimTemplates to use a storageClass that was created using another deployment file.
# StorageClass definition
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: storage-01
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
iopsPerGB: "300"
fsType: ext4
reclaimPolicy: Retain
allowVolumeExpansion: true
I would like to be able to re-use the EBS volumes that get created with the deployment. So I had set the reclaimPolicy to Retain in the storageClass declaration. However, everytime I delete/apply the elastic deployment, a new EBS volume is attached. How can I make sure that a new deployment in the cluster would attach to the existing EBS volume?
I see in latest ECK (1.5), there is an option to specify volume claim delete policy (Volume claim templates), wondering if something similar could be possible in 1.3.1?
volumeClaimDeletePolicy: DeleteOnScaledownOnly
Thanks.