Skip to content

MySQL password management

Connect to MySQL and run the following commands:

ALTER USER 'metalsoft'@'%' IDENTIFIED BY 'New-password1';
flush privileges;

Edit secrets.yaml with the new password and apply it:

---
apiVersion: v1
kind: Secret
metadata:
name: bsi-mysql-creds
namespace: demo-metalsoft
labels:
app.kubernetes.io/component: demo-metalsoft
app.kubernetes.io/part-of: demo-metalsoft
type: Opaque
stringData:
password: New-password1

Restart the MySQL deployment and any other deployments in the namespace that use the bsi-mysql-creds secret:

Terminal window
cd manifests/
grep bsi-mysql-creds * -l 2>/dev/null|grep deployment|sed 's/-deploy.*//g'|while read z
do kubectl -n demo-metalsoft rollout restart deployment $z
done