version - bitnami/drupal:8.3.7-r0
environment - k8s 1.7.6 on GKE
I'm trying to get a working setup where I would have several Drupal containersn running on k8s connected to the same external MySQL instance.
Things work well with a single drupal container with a StatefulSet where dynamic volumes are provided by GCP automatically for /bitnami/drupal and /bitnami/apache. A single container can recover from restart and access MySQL correctly. I inject username and password for mysql through k8s secrets.
But when I scale to several instances of drupal, later instances are not able to boot and I can see in the logs that there's a problem when the user "bn_drupal" tries to access the database. My hunch is that the "bn_drupal" user and its (randomly generated) mysql password are created on startup using the root account, so the first container creates it, but later containers can't create it as it's already there and they fail to login given that they don't have the random password used by the first container, so they fail to launch.
Is there a way to choose which user and password is used in the DB? Or at least inject the password used for "bn_drupal" as a secret?