Planet PostgreSQL - 2023-11-10T16:13:28Z
Kubernetes is a powerful and popular container orchestration platform that offers numerous benefits for organisations and developers. Many companies out there these days rely on Kubernetes (or some flavour of it including Rancher, OpenShift, etc.) to automate their environments.
PostgreSQL is perfectly suitable to run on Kubernetes. The way to handle a large relational database on a container orchestration platform is to use a thing called an “operator”. It takes care of all important features such as:
Running PostgreSQL
Backups and recovery
Upgrades and updates
… a lot more …
A Kubernetes operator is basically supported to be a replacement for a human “operator” handling all things “PostgreSQL” inside a Kubernetes deployment.
There are various operators for PostgreSQL out there. However, today we want to focus on the CYBERTEC PG operator which is available as Open Source inside our Github. repository. Feel free to check it out and run it in your environment without restrictions.
What is important to mention here: We are running using the CYBERTEC PG operator to manage thousands of instances around the world already. In other words: This code is reliable and just works. And if you find an area of improvement, we are open to pull requests.
In this blog you will learn how to use Minikube to run your first PostgreSQL cluster in your own local Kubernetes deployment.
Installing Minikube
Minikube is the easiest way to test Kubernetes locally on your machine. However, the procedure is the same in “real Kubernetes”. To make life easy for you we have included the deployment procedure of Minikube:
[hs@hansmacbook ~]$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
…
[hs@hansmacbook ~]$ sudo install minikube-darwin-amd64 /usr/local/bin/minikube
Password:
Now that we have installed Minikube, we can start it. In this case I have used Docker for virtualization. However, things such as VirtualBox are fine as well. Before running the [...]
AI生成摘要
Kubernetes是一个强大且流行的容器编排平台,适合运行PostgreSQL。使用“操作符”可以自动化管理数据库的运行、备份、恢复和升级等。CYBERTEC PG操作符是开源的,已在全球管理成千上万的实例。本文介绍了如何使用Minikube在本地Kubernetes部署中运行第一个PostgreSQL集群,包括安装Minikube、部署CYBERTEC PG操作符和集群,以及连接到集群。最后,还介绍了如何删除Kubernetes中的PostgreSQL实例。