Database
The chart can deploy an internal MariaDB instance or connect to an external database.
Internal Database (default)
mariadb:
enabled: true
image: "mariadb:12.3.3-noble"
auth:
rootPassword: "secretroot"
database: wordpress
username: wp_user
password: "secretpass"
primary:
persistence:
enabled: true
size: 8Gi
resources: {}External Database
mariadb:
enabled: false
externalDatabase:
host: db.example.com
port: 3306
user: wp_user
password: "secretpass"
database: wordpressThe first start waits for the database
WordPress installs itself when its container first starts, and that needs the database. If the database does not answer yet, the container asks again before it goes on, and its log says so:
Waiting for the database (30 s of at most 300 s) …It is WordPress's own configuration that is asked, so the wait holds for the bundled MariaDB, for externalDatabase.*, for a wp-config.php of your own and for a database proxy in a sidecar alike. The limit is WORDPRESS_DB_WAIT_TIMEOUT seconds (300; 0 does not wait), set through extraEnvVars; a single try takes up to five seconds beyond it. With the default liveness probe the kubelet starts the container again before the limit, so a database that stays away shows in the pod's restarts. Past the limit the start goes on as it did before; a new installation is then made at the container's next start.