MySqlService

The MySqlService is used by many operators to get a database for their service. This resource is normally not used by the users directly but we provide here an example for better understanding.


apiVersion: v1
kind: Secret
metadata:
  name: backup-s3-password
type: Opaque
data:
  access: QWNjZXNzS2V5 # base64 of "AccessKey"
  secret: U2VjcmV0S2V5 # base64 of "SecretKey"
---
apiVersion: infra.yaook.cloud/v1
kind: MySQLService
metadata:
  name: testdb
spec:
  database: testdb
  imageRef: <bitnami-image-ref
  replicas: 1
  proxy:
    replicas: 2
    timeoutClient: 300
  mysqlConfig: {}
  frontendIssuerRef:
    name: ca-issuer
  backendCAIssuerRef:
    name: selfsigned-issuer
  storageSize: 10Gi
  backup:
    schedule: "*/5 * * * *"
    mysqldump: true
    targets:
      s3:
        endpoint: https://cool.s3.endpoint
        bucket: mybucket
        addressingStyle: path
        credentialRef:
          name: backup-s3-password