apiVersion: apps/v1 kind: Deployment metadata: name: mariadb labels: app: mariadb spec: selector: matchLabels: app: mariadb strategy: type: Recreate template: metadata: labels: app: mariadb spec: subdomain: mariadb nodeSelector: kubernetes.io/hostname: gunter-nb containers: - name: mariadb image: mariadb:10.7.3 envFrom: - secretRef: name: mariadb-secret ports: - containerPort: 3306 volumeMounts: - name: localtime mountPath: /etc/localtime readOnly: true - name: timezone mountPath: /etc/timezone readOnly: true - name: data mountPath: /var/lib/mysql volumes: - name: localtime hostPath: path: /etc/localtime type: File - name: timezone hostPath: path: /etc/timezone type: File - name: data hostPath: path: /var/local/microk8s/mariadb type: DirectoryOrCreate