Your first instance
Create a claim in your namespace:
apiVersion: v0.mariadb.helmetica-bundles.io/bundle
kind: Mariadb
metadata:
name: db
namespace: my-app
spec:
approval:
strategy: Automatic
values:
service:
plan: standard-2
The apiVersion and kind depend on how your platform registers the service; kubectl api-resources | grep mariadb shows them.
Wait until the instance is ready:
kubectl -n my-app get mariadb db -w
The service is provisioned in its own instance namespace:
$ kubectl -n my-app get mariadb db -o jsonpath='{.status.instanceNamespace}'
helx-mariadb-...
The connection details are in a Secret beside the claim. Try them from a pod in your namespace:
secret=$(kubectl -n my-app get secrets -o name | grep '^secret/db-')
key() { kubectl -n my-app get "$secret" -o jsonpath="{.data.$1}" | base64 -d; }
kubectl -n my-app run mariadb-client --rm -it --restart=Never --image=mariadb:11.8 \
--env="MYSQL_PWD=$(key MARIADB_PASSWORD)" \
-- mariadb -h "$(key MARIADB_HOST)" -u root --skip-ssl-verify-server-cert -e 'SELECT VERSION()'
Then connect your application.