apiVersion: v1 kind: Service metadata: name: appsmith-mysql namespace: appsmith labels: app: appsmith spec: type: NodePort ports: - name: mysql port: 3306 nodePort: 30785 targetPort: mysql selector: app: appsmith tier: mysql --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: mysql-pv-claim namespace: appsmith labels: app: appsmith spec: accessModes: - ReadWriteOnce resources: requests: storage: 25Gi selector: matchLabels: app: mysql --- apiVersion: apps/v1 kind: Deployment metadata: name: appsmith-mysql namespace: appsmith labels: app: appsmith spec: selector: matchLabels: app: appsmith tier: mysql strategy: type: Recreate template: metadata: labels: app: appsmith tier: mysql spec: containers: - image: mariadb:latest name: mysql env: - name: MYSQL_ROOT_PASSWORD valueFrom: secretKeyRef: name: mysql-pass key: password ports: - containerPort: 3306 name: mysql volumeMounts: - name: mysql-persistent-storage mountPath: /var/lib/mysql imagePullSecrets: - name: reg-cred-secret volumes: - name: mysql-persistent-storage persistentVolumeClaim: claimName: mysql-pv-claim