Changing Database Passwords
Resetting Passwords
The following procedure walks through the process of changing passwords for the database users in the Immuta Database and Query Engine.
The commands outlined here will need to be altered depending on your Helm release name and chosen passwords. Depending on your environment, there may be other changes required for the commands to complete successfully, including, but not limited to, Kubernetes namespace, kubectl context, and Helm values file name.
This process results in downtime.
Database
-
Scale database
StatefulSet
to 1 replica:kubectl scale statefulset < release-name >-immuta-database --replicas 1
-
Change
database.superuserPassword
:- Alter Postgres user password:
kubectl exec < release-name >-immuta-database-0 -- \ psql -d bometadata -c \ "ALTER USER postgres WITH ENCRYPTED PASSWORD '< new password >'"
- Update
database.superuserPassword
with< new password >
inimmuta-values.yaml
.
-
Change
database.replicationPassword
:- Alter replicator user password:
kubectl exec < release-name >-immuta-database-0 -- \ psql -d bometadata -c \ "ALTER USER replicator WITH ENCRYPTED PASSWORD '< new password >'"
- Update
database.replicationPassword
with< new password >
inimmuta-values.yaml
.
-
Change
database.password
:- Alter
bometa
user password:
kubectl exec < release-name >-immuta-database-0 -- \ psql -d bometadata -c \ "ALTER USER bometa WITH ENCRYPTED PASSWORD '< new password >'"
- Update
database.password
with< new password >
inimmuta-values.yaml
.
- Alter
-
Update
database.patroniApiPassword
with< new password >
inimmuta-values.yaml
. -
Run
helm upgrade
to persist the changes and scale the databaseStatefulSet
up:helm upgrade --reuse-values < release name > immuta/immuta
-
Restart web pods:
kubectl rollout restart deployment/< release name >-immuta-web