A fun project to make PostgreSQL people dancing. Especially during conferences. ;)
Run Kubernetes cluster in your own laptop with kind.
Install kind by following the official documentation:
https://kind.sigs.k8s.io/docs/user/quick-start/
Control Kubernetes resources with its own client.
Install it from the official documentation: https://kubernetes.io/docs/tasks/tools/#kubectl
Run PostgreSQL in Kubernetes with CNPh.
Install the latest version from its official documentation: https://cloudnative-pg.io/docs/devel/installation_upgrade#directly-using-the-operator-manifest
Manage your CNPG cluster with the CNPG plugin.
Install it from its official documentation: https://cloudnative-pg.io/docs/devel/kubectl-plugin/#install
kind create cluster -n pg_danceOnce the kind cluster is ready:
kubectl apply --server-side -f \
https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.28/releases/cnpg-1.28.0.yamlkubectl rollout status deployment \
-n cnpg-system cnpg-controller-managerkubectl apply -f pg_dance.yamlkubectl wait --for=condition=Ready --timeout=600s cluster/pg-dancebash init.shbash pg_dance.sh