I m trying to connect google cloud disk as a kubernetes MYSQL storage.
So I create PVC file and connect it . but it doesn’t work . please help me
pvc-mysql.yaml
3apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-data-claim
spec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
wordpressdb-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: wordpressdb
spec:
......
spec:
volumes:
- name: mysql-data
persistentVolumeClaim:
claimName: mysql-data-claim
containers:
.............
volumeMounts:
- mountPath: "/var/lib/mysql"
name: mysql-data
subPath: mysql
.....