Crunchy Data Brings a Kubernetes Operator to Postgres
Crunchy Data’s new Kubernetes operator allows users to automate the creation of PostgreSQL databases and clusters.
“An operator is a piece of software that essentially knows a lot of the operational best practices, for whatever piece of software the operator is built for, and can deploy that piece of software in a good configuration on top of Kubernetes, and then keep it healthy over time,” explained Brandon Philips, CoreOS’ chief technology officer, in unveiling the concept.
Crunchy Data data architect Jeff McCormick said he’d been waiting for the Kubernetes API to mature enough to enable the Postgres operator. Its operator, a command-line utility called “pgo,” is built to run on 1.5 and later versions of Kubernetes.
“We wanted to do something native, and this is native to the Kubernetes API. It takes advantage of third-party resources and the new Golang Kubernetes client API that’s under heavy development now, too,” he said.
The initial release from Crunchy Data, a vendor offering a commercial version of open source Postgres, enables users to do three things: create a Postgres database, create a Postgres cluster and backup a database through the command line and a database restore.
The term “operator” was a term CoreOS coined to refer to actions a human operator do, especially for databases that require human intervention like backups or restore. But it’s just an application-specific controller that you can run like a pod or any other application, he said.
“The unique thing about this is that these operators work off the concept of third-party resources and that’s a Kubernetes concept that allows people like us at Crunchy to define our own Kubernetes resource types rather than just having pods or services,” he said. “That opens the door for non-Kubernetes application providers to create their own sets of resources that mean things in their domain.”
CoreOS initially unveiled operators for the monitoring technology Prometheus and key-value store etcd. Other operators have been built for the streaming technology Kafka, Elasticsearch, storage vendor Rook and monitoring tool Searchlight. SAP also has built several for OpenStack.
The operator is coded to listen for those third-party resources to be created, updated or deleted.
“If I create a Postgres database resource instance created, the operator will notice that and take action. When it sees that, it will go out and create a pod and a service, which is what I’m calling a Postgres database. It will also create a persistent volume to store data,” he explained.
The resource itself is just a bit of metadata about what the user wants it to create, so it’s dealing with low-level Kubernetes API code to create pods or services.
You can install it on anything that can create a Golang binary and it connects to the Kubernetes cluster. Pgo offers an easy way for users to make use of the Postgres operator, and it also gives of view of everything you’ve created. You can just say, “Show me my Postgres databases.” You don’t have to interact with Kubernetes directly.
The company plans to build on the initial three capabilities with new releases in four- to six-week increments, McCormick said. Support for OpenShift Origin, the open source version, will be in the second release, and the company is working with Red Hat to support it in OpenShift 3.5, the enterprise version, due out this summer.
Crunchy Data also recently announced the PostgreSQL Security Technical Implementation Guide (STIG). It’s published by the Department of Defense to help users understand how the 20-year-old open source database can be deployed and configured to meet security requirements for government systems. Crunchy Certified PostgreSQL also has received Common Criteria Evaluation Assurance Level (EAL) 2+ certification, an international standard for computer security certification. Both are firsts for an open source database, according to the company.
Red Hat is a sponsor of The New Stack.