Postgresql operator for any9/20/2023 … and finally the kubectl create -f manifests/api-service.yamlĪ few seconds later the operator pod should be cd kubectl get pod -l name=postgres-operator The PostgreSQL operator kubectl create -f manifests/postgres-operator.yamlĭeployment.apps/postgres-operator created Next is the RBAC (role based access control) stuff (I’ve done that already before and did not do a proper cleanup, that’s why the postgres-operator service account already kubectl create -f manifests/operator-service-account-rbac.yamlĬ8s.io/postgres-operator createdĬ8s.io/postgres-operator createdĬ8s.io/postgres-pod createdĮrror from server (AlreadyExists): error when creating "manifests/operator-service-account-rbac.yaml": serviceaccounts "postgres-operator" already exists This was the way to do it on the command line, the same is possible with the Rancher UI as well: The first step is to create the config map (have a look at it to get an idea of all the parameters and kubectl create -f manifests/configmap.yaml That’s it for the preparation and we are ready to clone the PostgreSQL operator git clone Pv-postgresql-2 10Gi RWO Retain Available 7m32s Pv-postgresql-1 10Gi RWO Retain Available 8m50s NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE We can also use the command line for checking the persistent volumes we’ve just kubectl get pv On the left side you’ll find the Persistent Volumes:Īs there is no storage system attached to the demo environment, we’ll be using the “Host Path” plugin for my persistent volumes, and I’ll be creating two of them: The easiest way to do this is by using the “Cluster Explorer” We could do all the following steps using the command line, but we’ll use the Rancher UI for this. PostgreSQL needs to safely store it’s data somewhere, and for being able to do that we need persistent storage. Zalando does not only provide Patroni but also provides a PostgreSQL operator for Kubernetes, and we’ll be using this one for this demo.īefore we start with the PostgreSQL operator we need to prepare the system. I’ll be using my one node Rancher demo environment for this, but you can of course also use a cluster as described in the posts above. In this post we’ll use one of those systems to deploy a PostgreSQL cluster. In the previous posts ( Rancher, up and running, on EC2 – 1 – One node, Rancher, up and running, on EC2 – 2 – Three nodes, Rancher, up and running, on EC2 – 3 – Rancher setup, Rancher on SLES 15 as a demo environment, and Deploying a Kubernetes cluster on EC2 with Rancher) it was all about deploying a Kubernetes cluster and getting Rancher up and running.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |