I have deleted the pvc on my mediawiki kubernetes deployment and I am unable to get the deployment back into a running state because it can't reattach to the existing pv.
If I install it fresh, it just creates a new pvc withi a new pv. I want to use an existing pv (which has all my data) when I reinstall.
primary:
## Enable persistence using Persistent Volume Claims
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
## @param mariadb.primary.persistence.enabled Enable database persistence using PVC
## @param mariadb.primary.persistence.storageClass PVC Storage Class
## @param mariadb.primary.persistence.accessModes Persistent Volume Access Mode
## @param mariadb.primary.persistence.size Database Persistent Volume Size
## @param mariadb.primary.persistence.hostPath Host mount path for MariaDB volume
## @param mariadb.primary.persistence.existingClaim Enable persistence using an existing PVC
##
persistence:
enabled: true
## mariadb data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
storageClass: ""
accessModes:
- ReadWriteOnce
size: 8Gi
## Set path in case you want to use local host path volumes (not recommended in production)
##
hostPath: ""
## Use an existing PVC
##
existingClaim: ""
I am assuming I can just use the existingClaim: parameter and put in the pvc name.
However, I don't know how to create a pvc from scratch.
Can somebody please help me figure out how to create a pvc using an existing pv which is sitting unattached currently? As long as I don't delete that pv, I am hoping my data is safe.
This is on the Linode Kubernetes cluster if it matters.