Deployment Task

There are certain instances in which it is necessary to manually manipulate a containerized database. Take the steps below to connect to the container and the appropriate database. 

Deployment Steps

Connect to the container and the database: 

1. Go into the container shell:


    sudo docker exec -ti <DATABASE CONTAINER ID> sh


    sudo kubectl exec -it <DATABASE POD NAME> sh

2. Assume the postgres user:

    su <postgres admin user>

3. Connect to the scalock database using the postgres user:

psql -U postgres -d scalock

4. You are now connected and you can perform postgres database commands.

5. Disconnect from the database:


6. You can now exit from the shell and the container.