Reputation: 163
I try to describe my scenario:
I have a MariaDB from bitnami installed in an EKS Kubernetes cluster.
I'm deploying my database using helm with the following command
helm install mariadb bitnami/mariadb \
--set primary.persistence.enabled=true \
--set primary.persistence.size=1Gi
Is there any way to get the volume could attach again to a new node every day?
Thanks
SOLUTION
The problem was the AZ where my node and the volumen were created in every recreation, because I'm using multi-AZ. In my case, as is development environment, I forced to use just one AZ and the problem is fixed.
Upvotes: 1
Views: 1425
Reputation: 15480
You don't get back the volume because the node you launched every morning is not guaranteed to be in the same AZ as yesterday; which the volume was last created. Switch to single AZ will work for you as you only need to launch one node everyday. On the console goto the ASG and edit the Network -> Availability Zones.
Upvotes: 0
Reputation: 1218
Your volume is not begin persistent because it is not attached to an underlying volume in AWS.
Please have a look into attaching a EBS or EFS to eks node
https://aws.amazon.com/premiumsupport/knowledge-center/eks-persistent-storage/
Upvotes: 0