MySQL Forums
Forum List  »  MySQL & Kubernetes

Re: monitoring MySQL Operator for Kubernetes
Posted by: Johannes Schlüter
Date: March 22, 2023 08:12AM

Hi,

you can use the spec.podSpec property to override things we produce. That way you can add a sidecar.

For instance if you want to use the Prometheus exporter you can do this:

apiVersion: mysql.oracle.com/v2
kind: InnoDBCluster
name: mywithmetrics
spec:
instances: 3
podSpec:
containers:
- env:
- name: DATA_SOURCE_NAME
value: someUserName:@unix(/var/run/mysqld/mysql.sock)/
image: prom/mysqld-exporter
name: metrics
ports:
- metrics: 9104
volumeMounts:
- mountPath: /var/run/mysqld
name: rundir
secretName: mypwds
tlsUseSelfSigned: true

And then create a user with the required grants and for example socket authentication.

Options: ReplyQuote


Subject
Written By
Posted
Re: monitoring MySQL Operator for Kubernetes
March 22, 2023 08:12AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.