Kubernetes InnoDBCluster: all pods should share one PersistentVolumeClaim?
Following: https://dev.mysql.com/doc/mysql-operator/en/mysql-operator-innodbcluster-simple-kubectl.html
kubectl create namespace mysql-cluster-test
kubectl create secret generic mypwds \
--from-literal=rootUser=root \
--from-literal=rootHost=% \
--from-literal=rootPassword=123456 -n mysql-cluster-test
kubectl apply -f mycluster.yaml -n mysql-cluster-test
Kubectl get pods -n mysql-cluster-test
NAME READY STATUS RESTARTS AGE
mycluster-0 2/2 Running 0 12m
mycluster-1 2/2 Running 0 12m
mycluster-2 2/2 Running 0 12m
mycluster-router-5d87fbd754-zhsrh 1/1 Running 0 10m
kubectl get pvc -n mysql-cluster-test
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
datadir-mycluster-0 Bound pvc-b3bf5f24-99d0-4497-bd34-fd91eb4adc6c 2Gi RWO hostpath 8m9s
datadir-mycluster-1 Bound pvc-1c042c50-bc3f-43f8-8e16-094042495e6d 2Gi RWO hostpath 8m9s
datadir-mycluster-2 Bound pvc-85fbf9f9-d975-4899-a292-d247644cb2d2 2Gi RWO hostpath 8m9s
There are 3 mysql PODs, each of which has its own PVC and bound to different Volumes. Mysql data needs to be stored in one volume. Should all the PODs share one PVC?