Hello,

I am using Helm to manage installing new services in Kubernetes. I am using DO-block storage, and when I install a new site I automatically create a RWO volume to my pod to attach to.

I cannot however for the life of my understand how I can name my volumes. As I have atleast 50+ websites, it is nice to have a naming convention on them. Yes, I know that I see which services they are attached to etc, but reading the name “pvc-fadf4420-1f77-4fasc-8gg9b-df333eee75f49” in my Digital Ocean admin panel does not tell me much. I would like to name the volume “URL-pvc” for now. Is this possible to specify in the Helm chart?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

@jehansstorvik The name is derived from the value of the name key within metadata. For example,

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
 name: name-of-my-pvc
spec:
 storageClassName: manual
 selector:
 accessModes:
   - ReadWriteOnce
 resources:
   requests:
     storage: 20Gi

In the above, one can change the name-of-my-pvc to any suitable name for your particular use case. Now, you should be able to list this resource by doing the following:

kubectl get pvc

I wish that the above helps and all the best.

Think different and code well,

-Conrad

Submit an Answer