Is there a way for recovering PVC, pods and volume attachment information from detached volumes when EKS cluster is recreated

11/8/2019

We have not been able to get PVC information from Kubernetes provisioned volume when we attach to the Kubernetes worker node.

We have an EKS cluster setup with EC2 worker nodes in an autoscaling group. We have defined multiple storage classes in our namespace. We are planning to use this to deploy multiple pods that require data persistence. As EBS only supports the READWRITEONCE method of K8s provisioning, we are okay with that. The initial setup of the infrastructure is done with Terraform. So the dynamic provisioning of the volumes would be handled by K8s later. When we run terraform destroy, all the resources are destroyed except the volume, which is just detached as it is only dependent on AZs. Our issue is with reattaching the EBS to one of our worker nodes on the same AZs once they get provisioned. Even doing this manually will not give us the PVC, pods or volume information. Rebooting the instance did not help either.

Is there any way of mitigating this issue.

-- sparsha dotel
amazon-eks
amazon-web-services
aws-ebs
kubernetes
terraform

0 Answers