This project demonstrates the deployment of Patroni with Citus on Kubernetes using Kind (Kubernetes in Docker).
-
Clone the Repository
git clone https://github.com/mfenerich/patroni-citus-demo.git cd patroni-citus-demo -
Create a Kind Cluster
kind create cluster --name patroni-citus-demo
-
Build and Load Docker Image
Build the Docker image using the provided
Dockerfile:docker build -f Dockerfile -t patroni-citus-k8s .Load the image into the Kind cluster:
kind load docker-image patroni-citus-k8s --name patroni-citus-demo
-
Deploy on Kubernetes
Apply the Kubernetes configuration:
kubectl apply -f citus_k8s.yaml
-
Verify Deployment
Check the stateful sets:
kubectl get sts
Check the pods and their roles:
kubectl get pods -l cluster-name=citusdemo -L role
- Dockerfile: Defines the container for running Patroni and Citus.
- citus_k8s.yaml: Kubernetes manifest for deploying the project.
- entrypoint.sh: Entrypoint script for the container.