Charmed PostgreSQL K8s How-To | Deploy on MicroK8s

How to deploy on MicroK8s

This guide assumes you have a running Juju and MicroK8s environment.

For a detailed walkthrough of setting up an environment and deploying the charm on MicroK8s, refer to the following Tutorial pages:

MicroK8s can be installed on a multitude of platforms and environments for different use cases. See all options and details in the official documentation.

Not all platforms supported by MicroK8s will work with this charm - keep in mind the system requirements of Charmed PostgreSQL.

Prerequisites


Bootstrap a juju controller and create a model if you haven’t already:

juju bootstrap localhost <controller name>
juju add-model <model name>

Deploy PostgreSQL K8s:

juju deploy postgresql-k8s --trust

:warning: The --trust flag is necessary to create some K8s resources

See the juju deploy documentation for all available options at deploy time.

See the Configurations tab for specific PostgreSQL K8s parameters.

Example juju status --wait 1s output:

Model       Controller  Cloud/Region        Version  SLA          Timestamp
example  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