Red Hat OpenShift brings an environment to simplify harnessing the power of Kubernetes for managing a suite of stateless applications, but applications that maintain state (e.g. databases) often require a little bit more work. Often on teams, there are people dedicated to managing the requirements, configurations, deployment for stateful applications in their production environment and are responsible for the real-time monitoring as well controlling authorization and access to these systems.

The robustness of PostgreSQL from a feature standpoint, as well as its ability to meet the compliance and scale requirements for enterprises, makes it no exception to requiring additional support to run it at scale on OpenShift.

In order to enable enterprises to deploy and maintain PostgreSQL containers at scale, Crunchy Data built an open source PostgreSQL Operator. The PostgreSQL Operator leverages the “Operator” design pattern initially created by the team at CoreOS. Kubernetes Operators extend the Kubernetes API to enable teams to perform their administration tasks at scale.

More specifically, CoreOS defines an Operator as “an application-specific controller that extends the Kubernetes API to create, configure, and manage instances of complex stateful applications on behalf of a Kubernetes user. It builds upon the basic Kubernetes resource and controller concepts but includes domain or application-specific knowledge to automate common tasks.” [1]

Following the release of the Crunchy PostgreSQL Container Suite, Crunchy Data was frequently asked by enterprise customers - “How do we manage thousands of PostgreSQL containers?” The PostgreSQL Operator was designed to address that problem. Initially released in March 2017 and now on version 2.6, the PostgreSQL Operator automates many database management tasks associated with large-scale PostgreSQL operations, including:

  • Provisioning new PostgreSQL clusters
  • Creating PostgreSQL replicas and failover targets
  • Defining which servers and disks a PostgreSQL cluster should be deployed to (“node affinity”) as well as CPU & memory requirements
  • Defining and managing user authorization and access controls across databases
  • Deploying load balancing and performance monitoring to clusters
  • Performing backups and restores as well as minor and major upgrades across databases

and more. Your team can use the PostgreSQL Operator through a series of simple commands that can also be furthered automated through scripts or the Kubernetes API itself. For instance, if you want to create a cluster named “openshift1” with load balancing and monitoring to two replicas that run on your medium tier hardware (this assume you have set up your node labels), you would run the following two commands:

pgo create cluster openshift1 --metrics --pgpool
pgo scale openshift1 --replica-count=2 --node-label=speed=medium

Getting started with the PostgreSQL Operator on OpenShift is easy: the Crunchy Data team has a quickstart script for the Crunchy PostgreSQL Operator on OpenShift that will have you up and running in moments. While there are additional considerations in addition to configuration to securely run a PostgreSQL cluster on OpenShift, this script will allow you to become comfortable with using the PostgreSQL Operator and demonstrate to you the new possibilities of managing your databases at scale.

If you want to learn more about running PostgreSQL on Red Hat OpenShift, we invite you to view our Primed Partner page and encourage you to explore what applications you can deploy on OpenShift!


저자 소개

UI_Icon-Red_Hat-Close-A-Black-RGB

채널별 검색

automation icon

오토메이션

기술, 팀, 인프라를 위한 IT 자동화 최신 동향

AI icon

인공지능

고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트

open hybrid cloud icon

오픈 하이브리드 클라우드

하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요

security icon

보안

환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보

edge icon

엣지 컴퓨팅

엣지에서의 운영을 단순화하는 플랫폼 업데이트

Infrastructure icon

인프라

세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보

application development icon

애플리케이션

복잡한 애플리케이션에 대한 솔루션 더 보기

Virtualization icon

가상화

온프레미스와 클라우드 환경에서 워크로드를 유연하게 운영하기 위한 엔터프라이즈 가상화의 미래