---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mariadb
  namespace: authelia
  labels:
    app: mariadb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mariadb
  template:
    metadata:
      labels:
        app: mariadb
    spec:
      containers:
        - name: mariadb
          image: mariadb:11.5.2
          ports:
            - containerPort: 3306
          readinessProbe:
            tcpSocket:
              port: 3306
            periodSeconds: 1
          env:
            - name: MYSQL_ROOT_PASSWORD
              value: rootpassword
            - name: MYSQL_USER
              value: admin
            - name: MYSQL_PASSWORD
              value: password
            - name: MYSQL_DATABASE
              value: authelia
...
---
apiVersion: v1
kind: Service
metadata:
  name: mariadb-service
  namespace: authelia
spec:
  selector:
    app: mariadb
  ports:
    - protocol: TCP
      port: 3306
...
