{"id":30664,"date":"2024-02-07T08:49:44","date_gmt":"2024-02-07T07:49:44","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=30664"},"modified":"2024-02-07T08:49:46","modified_gmt":"2024-02-07T07:49:46","slug":"introduction-to-postgresql-in-openshift","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/","title":{"rendered":"Introduction to PostgreSQL in OpenShift"},"content":{"rendered":"\n<p>I&#8217;m on a mission to tackle scary topics around DevOps these days! In my 2 previous blog posts (<a href=\"https:\/\/www.dbi-services.com\/blog\/are-you-afraid-of-the-word-devops-part-1\/\" target=\"_blank\" rel=\"noreferrer noopener\">Part 1<\/a> and <a href=\"https:\/\/www.dbi-services.com\/blog\/are-you-afraid-of-the-word-devops-part-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">Part 2<\/a>) I&#8217;ve tried to demystified the DevOps word (and world!) by describing what it actually is with a simple example.<\/p>\n\n\n\n<p>But there is an even scarier topic (true story!), which is&#8230; deploying a database in Kubernetes! Database is to Kubernetes what the garlic is to the vampires! Yes you get the picture below but it doesn&#8217;t have to be that way!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic-1024x512.jpeg\" alt=\"\" class=\"wp-image-30695\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic-1024x512.jpeg 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic-300x150.jpeg 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic-768x384.jpeg 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic.jpeg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>It is a common belief that it is not recommended or even possible for production databases and some people just move away from it. However other people have thought it twice and have actually deployed production databases on Kubernetes with no loss of data for years. If you want to give it a try, I&#8217;ll show you an example of how you can test it very quickly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-choice-of-technology\">The choice of technology<\/h2>\n\n\n\n<p>First you have to select a database technology and I&#8217;m going with the widely used PostgreSQL. It is one of the many database choices that is part of the <a href=\"https:\/\/landscape.cncf.io\" target=\"_blank\" rel=\"noreferrer noopener\">CNCF landscape<\/a> as shown below. CNCF is a vendor-neutral hub for all applications that can run as containers. They are then called cloud native:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"514\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db-1024x514.png\" alt=\"\" class=\"wp-image-30669\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db-1024x514.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db-300x150.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db-768x385.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db-1536x770.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db.png 1890w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then, all the magic for installing a database in a Kubernetes cluster is related to its Operator. The choice of a mature operator is important as it will do all the hard work for us. For PostgreSQL there are several choices and a popular one used by many companies is <a href=\"https:\/\/github.com\/cloudnative-pg\/cloudnative-pg?tab=readme-ov-file\" target=\"_blank\" rel=\"noreferrer noopener\">CloudNativePG<\/a>. In addition, it is also part of the database CNCF landscape through EDB so it deserves serious consideration:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"406\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db2-1024x406.png\" alt=\"\" class=\"wp-image-30670\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db2-1024x406.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db2-300x119.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db2-768x305.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db2-1536x610.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/CNCF_db2.png 1890w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>CloudNativePG can be installed on any flavour of Kubernetes and I&#8217;ve chosen the one from Red Hat called OpenShift (if you need a QuickStart on it, you can check my blog posts <a href=\"https:\/\/www.dbi-services.com\/blog\/test-openshift-4-at-low-cost-in-azure\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> then <a href=\"https:\/\/www.dbi-services.com\/blog\/interacting-with-openshift-local-in-an-azure-vm\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>). With its OperatorHub it is very easy and quick to deploy an Operator and have one PostgreSQL cluster ready to play with in your Kubernetes cluster. If you are like me, you want to play with your new toy right now!<\/p>\n\n\n\n<p>For those of you that are already familiar with this topic, you may wonder why not use the Operator crunchydata that is also part of the CNCF and suits OpenShift very well. That is a fantastic question and it would also be an excellent choice. That may be the topic for another blog post!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-operator-installation-in-openshift-with-the-web-ui\">Operator installation in OpenShift with the Web UI<\/h2>\n\n\n\n<p>Let&#8217;s install CloudNativePG (CNPG) and look how easy it is in OpenShift. First I like to create a separate project (or namespace) to keep everything tidy but it is not mandatory. I cheat a bit by using the command line interface here as I have a shell open to my OpenShift cluster:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ oc new-project cloudnativepg\n<\/pre><\/div>\n\n\n<p>Then just use the UI Web console from OpenShift to install and deploy everything. If you like click-click-click-click you are in for a treat!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"331\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_1-1024x331.png\" alt=\"\" class=\"wp-image-30676\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_1-1024x331.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_1-300x97.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_1-768x248.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_1-1536x496.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_1-2048x661.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"701\" height=\"1024\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_2-701x1024.png\" alt=\"\" class=\"wp-image-30677\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_2-701x1024.png 701w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_2-205x300.png 205w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_2-768x1123.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_2.png 1018w\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"545\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_3-1024x545.png\" alt=\"\" class=\"wp-image-30678\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_3-1024x545.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_3-300x160.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_3-768x408.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_3-1536x817.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_3-2048x1089.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click on &#8220;Create instance&#8221; in the Cluster panel:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"545\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_4-1024x545.png\" alt=\"\" class=\"wp-image-30679\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_4-1024x545.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_4-300x160.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_4-768x409.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_4-1536x818.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/OpenShift_CNPG_4-2048x1091.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click the button &#8220;Create&#8221; to install a PostgreSQL cluster with 2 instances and that&#8217;s it!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-check-the-installation-process-and-result-in-cli\">Check the installation process and result in CLI<\/h2>\n\n\n\n<p>If you are familiar with Kubernetes in general, you are also used to the Command Line Interface (CLI). After you&#8217;ve clicked on the button &#8220;Create&#8221;, you can follow along all this installation process as shown below:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ oc get po -n cloudnativepg -w\nNAME                                      READY   STATUS     RESTARTS   AGE\ncluster-pg-1-initdb-zdthn                 0\/1     Init:0\/1   0          20s\ncnpg-controller-manager-bd7c97dc7-kw4pk   1\/1     Running    0          5m14s\ncluster-pg-1-initdb-zdthn                 0\/1     Init:0\/1   0          20s\ncluster-pg-1-initdb-zdthn                 0\/1     PodInitializing   0          23s\ncluster-pg-1-initdb-zdthn                 1\/1     Running           0          102s\ncluster-pg-1-initdb-zdthn                 0\/1     Completed         0          2m11s\ncluster-pg-1-initdb-zdthn                 0\/1     Completed         0          2m14s\ncluster-pg-1-initdb-zdthn                 0\/1     Completed         0          2m15s\ncluster-pg-1-initdb-zdthn                 0\/1     Completed         0          2m15s\ncluster-pg-1                              0\/1     Pending           0          0s\ncluster-pg-1                              0\/1     Pending           0          0s\ncluster-pg-1                              0\/1     Init:0\/1          0          0s\ncluster-pg-1                              0\/1     Init:0\/1          0          3s\ncluster-pg-1                              0\/1     Init:0\/1          0          6s\ncluster-pg-1                              0\/1     PodInitializing   0          7s\ncluster-pg-1                              0\/1     Running           0          9s\ncluster-pg-1                              0\/1     Running           0          15s\ncluster-pg-1                              0\/1     Running           0          21s\ncluster-pg-1                              1\/1     Running           0          21s\ncluster-pg-2-join-x5cdh                   0\/1     Pending           0          0s\ncluster-pg-2-join-x5cdh                   0\/1     Pending           0          0s\ncluster-pg-2-join-x5cdh                   0\/1     Pending           0          3s\ncluster-pg-2-join-x5cdh                   0\/1     Init:0\/1          0          3s\ncluster-pg-2-join-x5cdh                   0\/1     Init:0\/1          0          5s\ncluster-pg-2-join-x5cdh                   0\/1     Init:0\/1          0          7s\ncluster-pg-2-join-x5cdh                   0\/1     PodInitializing   0          9s\ncluster-pg-2-join-x5cdh                   1\/1     Running           0          11s\ncluster-pg-2-join-x5cdh                   0\/1     Completed         0          21s\ncluster-pg-2-join-x5cdh                   0\/1     Completed         0          24s\ncluster-pg-2-join-x5cdh                   0\/1     Completed         0          24s\ncluster-pg-2-join-x5cdh                   0\/1     Completed         0          25s\ncluster-pg-2                              0\/1     Pending           0          0s\ncluster-pg-2                              0\/1     Pending           0          0s\ncluster-pg-2                              0\/1     Init:0\/1          0          0s\ncluster-pg-2                              0\/1     Init:0\/1          0          4s\ncluster-pg-2                              0\/1     Init:0\/1          0          7s\ncluster-pg-2                              0\/1     PodInitializing   0          7s\ncluster-pg-2                              0\/1     Running           0          9s\ncluster-pg-2                              0\/1     Running           0          12s\ncluster-pg-2                              0\/1     Running           0          13s\ncluster-pg-2                              1\/1     Running           0          21s\ncluster-pg-1-initdb-zdthn                 0\/1     Terminating       0          3m29s\ncluster-pg-2-join-x5cdh                   0\/1     Terminating       0          49s\ncluster-pg-1-initdb-zdthn                 0\/1     Terminating       0          3m29s\ncluster-pg-2-join-x5cdh                   0\/1     Terminating       0          49s\n<\/pre><\/div>\n\n\n<p>In a few minutes we can see each of our PostgreSQL instance in 2 separate Pods: cluster-pg-1 and cluster-pg-2<\/p>\n\n\n\n<p>You may have heard that databases in Kubernetes are based on the object StatefulSet but CNPG doesn&#8217;t use it as you can see below:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ oc get sts -n cloudnativepg\nNo resources found in cloudnativepg namespace.\n<\/pre><\/div>\n\n\n<p>The Operator install all the Kubernetes Objects required to run PostgreSQL in it. I&#8217;ll keep this blog post at the high level so I will not dive into it. However it would be interesting to see a simple example of data being creating in our instance-1 and then see they have been replicated into instance-2. Let&#8217;s just do that.<\/p>\n\n\n\n<p>The username and password to connect to the PostgreSQL database are stored in a secret. You can get these credentials as follows:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ oc get secrets -n cloudnativepg cluster-pg-app -oyaml\n<\/pre><\/div>\n\n\n<p>Username and password are coded in base64 so you can decode them as shown below (for example for the username):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ echo -n &quot;YXBw&quot; | base64 --decode\napp\n<\/pre><\/div>\n\n\n<p>With these credentials information you can now jump into the pod and connect to the PostgreSQL database:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ oc exec -it -n cloudnativepg cluster-pg-1 -- bash\n\n1000660000@cluster-pg-1:\/$ psql -h localhost -U app\nPassword for user app: &lt;enter the decoded password here&gt;\npsql (16.1 (Debian 16.1-1.pgdg110+1))\nSSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)\nType &quot;help&quot; for help.\n\napp=&gt; CREATE TABLE customers (firstname text,lastname text, id serial);\nCREATE TABLE\n\napp=&gt; INSERT INTO customers (firstname, lastname) VALUES ( &#039;John&#039;, &#039;Doe&#039;);\nINSERT 0 1\n\napp=&gt; \\dt\n         List of relations\n Schema |   Name    | Type  | Owner\n--------+-----------+-------+-------\n public | customers | table | app\n(1 row)\n\napp=&gt; SELECT * FROM customers;\n firstname | lastname | id\n-----------+----------+-------------\n John       | Doe    |           1\n(1 row)\n<\/pre><\/div>\n\n\n<p>We have created a table with one entry in it. Let&#8217;s check if we can find it into the other instance:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ oc exec -it -n cloudnativepg cluster-pg-2 -- bash\n\n1000660000@cluster-pg-2:\/$ psql -h localhost -U app\nPassword for user app:\npsql (16.1 (Debian 16.1-1.pgdg110+1))\nSSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)\nType &quot;help&quot; for help.\n\napp=&gt; \\dt\n         List of relations\n Schema |   Name    | Type  | Owner\n--------+-----------+-------+-------\n public | customers | table | app\n(1 row)\n\napp=&gt; SELECT * FROM customers;\n firstname | lastname | customer_id\n-----------+----------+-------------\n John       | Doe    |           1\n(1 row)\n<\/pre><\/div>\n\n\n<p>Our data have been replicated from our first instance (pod cluster-pg-1) to our second instance (pod cluster-pg-2)! Our PostgreSQL cluster is working!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-wrap-up\">Wrap up<\/h2>\n\n\n\n<p>With this simple example you can now play with your PostgreSQL cluster like you would if it was installed on a Bare-Metal or in a Virtual Machine. Of course this PostgreSQL cluster is not optimized at all for performance but you can see that it is possible to install a database in Kubernetes. If you want to learn more about PostgreSQL you can check out our several <a href=\"https:\/\/www.dbi-services.com\/courses\/?search=postgres&amp;category=&amp;location=\" target=\"_blank\" rel=\"noreferrer noopener\">Training courses<\/a> on this topic.<\/p>\n\n\n\n<p>So, don&#8217;t be afraid of running databases in Kubernetes, try it and you&#8217;ll love it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m on a mission to tackle scary topics around DevOps these days! In my 2 previous blog posts (Part 1 and Part 2) I&#8217;ve tried to demystified the DevOps word (and world!) by describing what it actually is with a simple example. But there is an even scarier topic (true story!), which is&#8230; deploying a [&hellip;]<\/p>\n","protected":false},"author":109,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1320,1522,83],"tags":[3241,2667,2634,1344,2602],"type_dbi":[3242,3017,2943,3186,2749],"class_list":["post-30664","post","type-post","status-publish","format-standard","hentry","category-devops","category-kubernetes","category-postgresql","tag-cloudnativepg","tag-devops-2","tag-kubernetes-2","tag-openshift","tag-postgresql-2","type-cloudnativepg","type-devops","type-kubernetes","type-openshift","type-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Introduction to PostgreSQL in OpenShift - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to PostgreSQL in OpenShift\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m on a mission to tackle scary topics around DevOps these days! In my 2 previous blog posts (Part 1 and Part 2) I&#8217;ve tried to demystified the DevOps word (and world!) by describing what it actually is with a simple example. But there is an even scarier topic (true story!), which is&#8230; deploying a [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-07T07:49:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-07T07:49:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic-1024x512.jpeg\" \/>\n<meta name=\"author\" content=\"DevOps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DevOps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/\"},\"author\":{\"name\":\"DevOps\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735\"},\"headline\":\"Introduction to PostgreSQL in OpenShift\",\"datePublished\":\"2024-02-07T07:49:44+00:00\",\"dateModified\":\"2024-02-07T07:49:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/\"},\"wordCount\":865,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic-1024x512.jpeg\",\"keywords\":[\"cloudnativepg\",\"devops\",\"kubernetes\",\"OpenShift\",\"postgresql\"],\"articleSection\":[\"DevOps\",\"Kubernetes\",\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/\",\"name\":\"Introduction to PostgreSQL in OpenShift - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic-1024x512.jpeg\",\"datePublished\":\"2024-02-07T07:49:44+00:00\",\"dateModified\":\"2024-02-07T07:49:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic.jpeg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic.jpeg\",\"width\":1200,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction to PostgreSQL in OpenShift\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735\",\"name\":\"DevOps\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g\",\"caption\":\"DevOps\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/devops\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Introduction to PostgreSQL in OpenShift - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/","og_locale":"en_US","og_type":"article","og_title":"Introduction to PostgreSQL in OpenShift","og_description":"I&#8217;m on a mission to tackle scary topics around DevOps these days! In my 2 previous blog posts (Part 1 and Part 2) I&#8217;ve tried to demystified the DevOps word (and world!) by describing what it actually is with a simple example. But there is an even scarier topic (true story!), which is&#8230; deploying a [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/","og_site_name":"dbi Blog","article_published_time":"2024-02-07T07:49:44+00:00","article_modified_time":"2024-02-07T07:49:46+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic-1024x512.jpeg","type":"","width":"","height":""}],"author":"DevOps","twitter_card":"summary_large_image","twitter_misc":{"Written by":"DevOps","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/"},"author":{"name":"DevOps","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735"},"headline":"Introduction to PostgreSQL in OpenShift","datePublished":"2024-02-07T07:49:44+00:00","dateModified":"2024-02-07T07:49:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/"},"wordCount":865,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic-1024x512.jpeg","keywords":["cloudnativepg","devops","kubernetes","OpenShift","postgresql"],"articleSection":["DevOps","Kubernetes","PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/","url":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/","name":"Introduction to PostgreSQL in OpenShift - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic-1024x512.jpeg","datePublished":"2024-02-07T07:49:44+00:00","dateModified":"2024-02-07T07:49:46+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic.jpeg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/Vampire_garlic.jpeg","width":1200,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/introduction-to-postgresql-in-openshift\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Introduction to PostgreSQL in OpenShift"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4cd1b5f8a3de93f05a16ab8d7d2b7735","name":"DevOps","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cdd2dd7441774355062c0f0f68612296b059cd1e2ff6c7af0b15dba0ed64a85f?s=96&d=mm&r=g","caption":"DevOps"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/devops\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/30664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/109"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=30664"}],"version-history":[{"count":16,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/30664\/revisions"}],"predecessor-version":[{"id":30709,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/30664\/revisions\/30709"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=30664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=30664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=30664"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=30664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}