How to deploy on MicroK8s
This guide goes shows you how to deploy Charmed PostgreSQL on MicroK8s, Canonical’s lightweight Kubernetes engine.
Prerequisites
- Charmed PostgreSQL K8s Revision 73+
- Canonical MicroK8s 1.27+
- Fulfill the general system requirements
Summary
MicroK8s on Multipass
The Charmed PostgreSQL K8s Tutorial contains detailed instructions to deploy PostgreSQL on MicroK8s and Multipass in the following pages:
- 1. Set up the environment - set up Multipass and Juju
- 2. Deploy PostgreSQL - deploy PostgresQL K8s in a Multipass instance
Summary
Below is an example of the commands to deploy PostgreSQL K8s on MicroK8s running inside a Multipass VM from scratch on Ubuntu 22.04 LTS:
sudo snap install multipass
multipass launch --cpus 4 --memory 8G --disk 30G --name my-vm charm-dev
multipass shell my-vm
juju add-model example
juju deploy postgresql-k8s --trust
Example juju status
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
MicroK8s on other platforms
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.
Test your deployment
Check the Testing reference to test your deployment.