Quick start v1
You can test an EDB Postgres Distributed (PGD) cluster on your laptop or computer using EDB Postgres Distributed for Kubernetes on a single local Kubernetes cluster built with Kind.
Warning
These instructions are only for demonstration, testing, and practice purposes and must not be used in production.
This quick start shows you how to start an EDB Postgres Distributed cluster on your local Kubernetes installation so you can experiment with it.
Important
To connect to the Kubernetes cluster, make sure that you have kubectl
installed on your machine.
See the Kubernetes documentation
on installing kubectl
.
Part 1 - Set up the local Kubernetes playground
Install Kind, a tool for running local Kubernetes clusters using Docker container nodes. (Kind stands for Kubernetes IN Docker.) If you already have access to a Kubernetes cluster, you can skip to Part 2.
Install Kind on your environment following the instructions in Kind Quick Start. Then, create a Kubernetes cluster:
Part 2 - Install EDB Postgres Distributed for Kubernetes
After you have a Kubernetes installation up and running on your laptop, you can install EDB Postgres Distributed for Kubernetes.
See Installation for details.
Part 3 - Deploy a PGD cluster
As with any other deployment in Kubernetes, to deploy a PGD cluster you need to
apply a configuration file that defines your desired PGDGroup
resources that
make up a PGD cluster.
Some sample files are included in the EDB Postgres Distributed for Kubernetes repository. The flexible_3regions.yaml manifest contains the definition of a PGD cluster with two data groups and a global witness node spread across three regions. Each data group consists of two data nodes and a local witness node.
Regions and availability zones
When creating Kubernetes clusters in different regions or availability zones for cross-regional replication,
ensure the clusters can communicate with each other by enabling network connectivity. Specifically, every service created with a -node
or -group
suffix must be discoverable by all other -node
and -group
services. You can achieve this by deploying a network connectivity application like
Submariner on every cluster.
Further reading
For more details about the available options, see the "API Reference" section.
You can deploy the flexible-3-regions
example by saving it first and running:
You can check that the pods are being created using the get pods
command:
The pods are being created as part of PGD nodes. As described in Architecture, they're implemented on top of EDB Postgres for Kubernetes clusters.
You can list the clusters then, which shows the PGD nodes:
Ultimately, the PGD nodes are created as part of the PGD groups that make up your PGD cluster.