apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: db
  labels:
    app: db
    tier: database
spec:
  replicas: 1
  selector:
    matchLabels:
      app: db
      tier: database
  serviceName: db
  template:
    metadata:
      labels:
        app: db
        tier: database
    spec:
      containers:
      - name: db
        image: sesame_db:latest
        imagePullPolicy: Never
        ports:
          - containerPort: 3306
        volumeMounts:
          - name: pv-sql
            mountPath: /var/lib/mysql/
  volumeClaimTemplates:
    - metadata: 
        name: pv-sql
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 60Mi