How to create initial user with Kubernetes MySQL-InnoDBCluster?

Viewed 19

So, currently, I'm deploying my own hand crafted Kubernetes deployment (yes, I know, should have been a stateful set!) for MySQL (8.0) and I've been using environment vars MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE to create the initial user (this is for a Rails app).

Now I'm thinking of migrating to the Kubernetes MySQL Operator and deploying a MySQL InnoDB Cluster using Helm. How do I inject these environment variables and create the initial user?

helm show values mysql-operator/mysql-innodbcluster doesn't show any suitable values. I see values for the root user, just not the initial non-root user.

(Actually, if I can sneak in another question, I also need to inject some scripts into /docker-entrypoint-initdb.d which I'm currently doing with a mounted configmap, but again, can't see how to do this with the InnoDB Cluster helm chart.)

Thanks.

0 Answers
Related