Persistent Volume
Hello, We’re using the reference infrastructure here and I am a little bit lost regarding PersistentVolumes and where I would create one. When I create a k8s-service within our EKS cluster I am using the following block to create a PVC, which seems like it will work fine (I have only run `terragrunt plan` to check output). ``` override_chart_inputs = { persistentVolumes = { somepvname-pv = { mountPath = "/var/data" claimName = "myservice-pvc" } } } ``` We have the `aws-ebs` storage class installed ``` NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE gp2 (default) kubernetes.io/aws-ebs Delete WaitForFirstConsumer false 216d ``` My questions are: 1. Where do I actually make a `PersistentVolume` in my cluster? 2. How do I either a) size my PVC manually or b) allow the PVC to size up automatically? I feel like I must be missing the place in the documentation this exists, so any help pointing that out would be great. Thanks! --- <ins datetime="2022-05-09T16:20:57Z"> <p><a href="https://support.gruntwork.io/hc/requests/108571">Tracked in ticket #108571</a></p> </ins>
Unfortunately, we don't have a lot of support for running stateful workloads on Kubernetes in our IaC library. This is why you haven't found any documentation on it - we don't have modules that support deploying the necessary resources to manage volumes. It is on our roadmap to add support for PVCs and PVs, but as of this writing (May 2022), we haven't implemented anything yet. Given that, you will have to either [create your own terraform modules](https://docs.gruntwork.io/reference/services/intro/create-your-own-service-catalog) that use the [kubernetes resources](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs) to manage the volumes (if you would like to use the existing ref arch pipeline and `terragrunt`). Alternatively, consider using `kubectl` manifests directly in combination with a Kubernetes native CI/CD solution, such as [flux-cd](https://fluxcd.io/) or [argo-cd](https://argoproj.github.io/cd/). In this world, the approach would be to store the manifests in the `infrastructure-live` repository under a separate top level directory, and point `flux` or `argo-cd` to read those manifests for apply.