Deploy Postgres HA on Rancher Part 1

Art Krisada
4 min readJul 9, 2020

To Deploy Postgres HA on Rancher, you must first install rancher with running kubernetes etcd, controlpane and worker. You can follow this note to have one.

First, Login to you rancher server then click link on your cluster.

Select Persistent Storage from top menu.

You must have two PV (Persistent Volume) to install Bitnami’s Postgres HA. Create your new PV by clicking on “Add Volume” button. In this note, I use Volume Plugin = Local, to show you how to do. You should use appropriate method for your scenario. For me, I used NFS Share for my staging environment. You can learn how to create NFS as follow.

Beware of permission issue on your share path.

Back to Method for Volume Plugin = HostPath, I create 2 folders for my 2 PVs on my worknode machine. I use chmod 777 for permission on newly create folders. It’s not recommend. You should apply appropriate permission for your environment.

Fill the form in Add Volume Page. Fill in the name you want, Volume Plugin = HostPath, Capacity you want, and the path you just created in your worknode.

Add Persistent Volume one more time for you second PV.

You will see they are available. Then Click on Top menu “Project/Namespaces”

Click on Project Default Link to bring up “App” in Top menu.

Click on Menu Apps. Then click Manages Catalog button to add bitnami catalog.

Add catalog as the picture above. Catalog URL for bitnami is
https://charts.bitnami.com/bitnami

After added catalog, you can use bitnami’s catalog to launch your application.

You can search for postgres and select postgres ha to install.

Create new namespace or use existing is up to you. You can add setting in Answer Section. I set passwords for this example. If you expand Detail Description, you can see options in this helm chart.

Click Launch to start deployment. If it’s done, you will see your app is Active.

If you go check your folders /apps/postgres/pv0 and pv1, you will see their are some content created.

To Connect to postgres ha with pgadmin4 will be in next story. Thank you.

--

--

Art Krisada

Never stop learning, because life never stop teaching.