I have been using mysql_exporter on k8s for a long time now. I am in a testing environment and I have migrated our DB to Planetscale. When trying to connect to the DB is keeps giving me:
"caller=exporter.go:149 level=error msg=“Error pinging mysqld” err=“Error 1105: unknown error: Code: UNAVAILABLE\nserver does not allow insecure connections, client must use SSL/TLS\n”
I do not use “DATA_SOURCE_NAME” env var because I have the .cnf mounted already.
I Have tried using a configmap for the .my.cnf which mounts correctly in ~/ and looks as follows:
apiVersion: v1
kind: ConfigMap
metadata:
name: prom-mysql-config
labels:
app: prom-mysql-exporter
data:
.my.cnf: |
[client]
user=exporter
password=myhashedpassword
port=3306
host=my.planetscale.db
tls=true
The DB does not have SSL/TLS key/cert, we just accept the server side one normally.
Is there any client side variable/argument that needs to be added to accept the server SSL certificate
Kind Regards