I haven’t written here for a while, and in that time I have been doing a lot of work on Microsoft Fabric, a SaaS Data Platform that uses the PowerBI ecosystem and components from Synapse.
It is still a rapidly developing tool, and recently a Terraform provider has been made available. As I love all things declarative (hence Nix and K8s), I wanted to dive in and explore how it could be used.
This is a guide to how you can connect to PostgreSQL from Microk8s pods. I will be using Ubuntu server 20.04, Postgres 12 and mircok8s version 1.18.4.
Install Get Microk8s using snap:
snap install microk8s --classic Get PostgreSQL using apt:
sudo apt install postgresql postgresql-contrib Configure Before we can connect to the PostgreSQL instance we need to start a cluster and enable some addons, and configure postgres to listen for connections from Microk8s.
I recently decided that my goal of creating and managing a kubernetes cluster to understand better how it works and what is happening under the hood had been realised, as my site had been successfully running on a cluster for a good while with no downtime, including during updates on Kubernetes from 1.15.X to 1.17.X.
As such I decided to look at what I can do to lower the management cost (time) and the hosting cost (money).