# Configuring Mattermost Operator deployment (PostgreSQL DB)

**URL:** <https://forum.mattermost.com/t/configuring-mattermost-operator-deployment-postgresql-db/15830>\
**Category:** Troubleshooting\
**Created:** [May 3, 2023, 8:02pm UTC](https://forum.mattermost.com/t/configuring-mattermost-operator-deployment-postgresql-db/15830 "2023-05-03T20:02:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kubeuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/kubeuser/32/6755_2.png) [@kubeuser](https://forum.mattermost.com/u/kubeuser)\
**Post date:** [May 3, 2023, 8:03pm UTC](https://forum.mattermost.com/t/configuring-mattermost-operator-deployment-postgresql-db/15830/1 "2023-05-03T20:03:00Z")

</div>

**Summary**  
I have installed a test instance of Mattermost using the Kubernetes operator. I also created a PostgreSQL StatefulSet deployment and provided the credentials to my Mattermost operator deployment. Mattermost is deployed and accessible. I have also verified that the mattermost instance was able to connect to the database and create tables etc.

My question is how do I edit the initial configuration of Mattermost so I can at least login via admin account? Also, is it possible to configure features like SSO/SAML and my organization during operator deployment (i.e. using a k8s configMap, secret etc).

I see that there is a .go file that sets MM\_CONFIG to DB\_CONNECTION\_STRING so I figure I need to set that somewhere like so:  
[https://docs.mattermost.com/configure/configuation-in-mattermost-database.html](https://docs.mattermost.com/configure/configuation-in-mattermost-database.html)

But I’m still at a loss as to how I create the initial admin user, let alone all of the other configs like SSO etc. Thank you for any help!

EDIT: I did try accessing one of the pods from my deployment and running:

```auto
mmctl user create --email test@domain.com --username admin --password apassword

```

This gave me:

```auto
Error: cannot read user credentials, maybe you need to login firse: stat /.config/mmctl/config: no such file or directory

```
