I had the reply below typed out and then on reading your post again, I realise you are probably asking about adding storage to a Charmed Kubernetes deployment? If so, @tvansteenburgh or one of the CK people can help there.
But I’ll leave my reply as well in case it’s useful to someone. I guess you could avoid creating the storage class YAML if you are using Juju to deploy k8s workloads to your CK.
You can create a storage pool in the Juju model with the relevant k8s storage provisioning parameters and Juju will set that up when you deploy a charm and specify storage. There some information here.
In summary, create a Juju storage pool
juju create-storage-pool <pool name> kubernetes \
storage-class=<storage class name> storage-provisioner=<provisioner> \
eg to create a storage pool for GCE persistent disks
juju create-storage-pool my-storage kubernetes \
(you don’t need to do this in practice as Juju will do it automatically on k8s backed by GCE, it’s just an example).
Then when you deploy your charm:
juju deploy some-charm --storage database=my-storage,1G