Charmed PostgreSQL K8s Tutorial > 2. Deploy PostgreSQL
Deploy Charmed PostgreSQL K8s
In this section, you will deploy a postgresql-k8s application to your juju model and track its status.
Summary
Deploy PostgreSQL
To deploy Charmed PostgreSQL K8s, run
juju deploy postgresql-k8s --trust
--trust
is required because the charm and Patroni need to create some K8s resources.
Juju will now fetch Charmed PostgreSQL K8s from Charmhub and deploy it to the local MicroK8s. This process can take several minutes depending on how provisioned (RAM, CPU, etc) your machine is.
Track application status
You can track the deployment by running:
juju status --watch 1s
This command is useful for checking the real-time information about the state of a charm and the machines hosting it. Check the juju status
documentation for more information about its usage.
When the application is ready, juju status
will show something similar to the sample output below:
Model Controller Cloud/Region Version SLA Timestamp
tutorial charm-dev microk8s/localhost 2.9.42 unsupported 12:00:43+01:00
App Version Status Scale Charm Channel Rev Address Exposed Message
postgresql-k8s active 1 postgresql-k8s 14/stable 56 10.152.183.167 no
Unit Workload Agent Address Ports Message
postgresql-k8s/0* active idle 10.1.188.206
You can also watch juju logs with the juju debug-log
command.
More info on logging in the juju logs documentation.
Next step: 3. Access PostgreSQL