### Clone Postgres Operator Examples Repository (Bash) Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/basic-setup Clone the example repository to your local machine. Ensure you have git installed and configured. Replace `` with your desired path and `YOUR_GITHUB_USERNAME` with your GitHub username. ```bash cd YOUR_GITHUB_UN="$YOUR_GITHUB_USERNAME" git clone --depth 1 "git@github.com:${YOUR_GITHUB_UN}/postgres-operator-examples.git" ``` -------------------------------- ### Clone Postgres Operator Examples Repository (Powershell) Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/basic-setup Clone the example repository using Powershell. Ensure you have git installed and configured. Replace `` with your desired path and `YOUR_GITHUB_USERNAME` with your GitHub username. ```powershell cd $env:YOUR_GITHUB_UN="YOUR_GITHUB_USERNAME" git clone --depth 1 "git@github.com:$env:YOUR_GITHUB_UN/postgres-operator-examples.git" ``` -------------------------------- ### Example Postgres Configuration Output Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/day-two/customize-cluster Example output from the 'SHOW work_mem;' command, indicating the applied configuration value. ```text work_mem ---------- 2MB ``` -------------------------------- ### Example of Additional Volume Configuration Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/additional-pvcs This example demonstrates how to configure multiple additional volumes with different settings for mounting paths, container targeting, and read-only access. ```yaml volumes: additional: - claimName: pv-claim-1 name: logging containers: [database] - claimName: pv-claim-2 name: secrets readOnly: true - claimName: pv-claim-3 name: manual containers: [] ``` -------------------------------- ### Copy Azure Configuration Example Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/backups-disaster-recovery/backups Copy the example Azure configuration file to azure.conf. This file will store your Azure Storage credentials. ```bash cp azure.conf.example azure.conf ``` -------------------------------- ### Install Monitoring Stack from OCI Registry Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/day-two/monitoring Installs the Crunchy Postgres for Kubernetes Monitoring stack directly from the OCI registry using the `helm install` command. Ensure Helm is configured to use OCI registries. ```bash helm install crunchy oci://registry.developers.crunchydata.com/crunchydata/crunchy-monitoring ``` -------------------------------- ### Installer Configuration for Related Images Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/configuring-cluster-images This is an example of how an installer might define related images using environment variables. PGO uses these to map Postgres versions to specific container images. ```yaml spec: containers: - name: operator image: postgres-operator env: - name: RELATED_IMAGE_POSTGRES_15 value: "registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-15.3-2512" ``` -------------------------------- ### Example Primary Pod Name Output Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/locale-and-encoding-settings This is an example of the output you might see when displaying the primary pod name. ```text hippo-instance1-hltn-0 ``` -------------------------------- ### Install Monitoring Stack with Kustomize Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/day-two/monitoring Install the Monitoring stack after customizing the Kustomize project. This command applies the configurations to your Kubernetes environment. ```bash kubectl apply -k config/monitoring ``` -------------------------------- ### Example External Database Connection String Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/pgadmin/advanced-configuration An example of a connection string for an external PostgreSQL database, suitable for use with pgAdmin. ```plaintext postgresql://hippo:$MY_PASSWORD@hippo-primary.postgres-operator.svc:5432/hippo ``` -------------------------------- ### Copy S3 Configuration Example Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/backups-disaster-recovery/backups Copy the example S3 configuration file to a new file named `s3.conf`. This file will store your S3 credentials and is protected from being committed to version control. ```bash cp s3.conf.example s3.conf ``` -------------------------------- ### Install Postgres Operator (PGO) Source: https://access.crunchydata.com/documentation/postgres-operator/latest/quickstart Install PGO, the Postgres Operator from Crunchy Data, using kustomize. This command creates the necessary namespace and PGO deployment. ```bash kubectl apply -k config/namespace ``` ```bash kubectl apply --server-side -k config/default ``` -------------------------------- ### Clone Postgres Operator Examples Repository Source: https://access.crunchydata.com/documentation/postgres-operator/latest/quickstart Clone the repository containing example configurations for the Postgres Operator. This is needed to create a Postgres cluster. ```bash git clone --depth 1 https://github.com/CrunchyData/postgres-operator-examples.git ``` ```bash cd postgres-operator-examples ``` -------------------------------- ### Install Operator in Cluster-Wide Mode Source: https://access.crunchydata.com/documentation/postgres-operator/latest/installation/kustomize Apply the kustomization file in the 'default' folder to install the operator in cluster-wide or multi-namespace mode. ```bash kubectl apply --server-side -k config/default ``` -------------------------------- ### Example External Database Connection String with Schema Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/pgadmin/advanced-configuration An example of a connection string specifying a particular schema for the external database connection. ```plaintext postgresql://hippo:$MY_PASSWORD@hippo-primary.postgres-operator.svc:5432/hippo?options=-csearch_path=myschema ``` -------------------------------- ### Install Customized Helm Chart Locally Source: https://access.crunchydata.com/documentation/postgres-operator/latest/installation/helm Installs the Crunchy Postgres Operator using a locally downloaded and potentially modified Helm chart. Use this after `helm pull` and customization. ```bash helm install pgo -n postgres-operator ./pgo ``` -------------------------------- ### PostgresCluster.spec.proxy.pgBouncer.containers[index].readinessProbe.httpGet Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster-v1 Configuration for readiness probes using HTTP GET requests. ```APIDOC ## PostgresCluster.spec.proxy.pgBouncer.containers[index].readinessProbe.httpGet ### Description HTTPGet specifies an HTTP GET request to perform. ### Parameters - **host** (`string`): Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - **httpHeaders** (`[]object`): Custom headers to set in the request. HTTP allows repeated headers. - **path** (`string`): Path to access on the HTTP server. - **port** (`int or string`): Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - **scheme** (`string`): Scheme to use for connecting to the host. Defaults to HTTP. ``` -------------------------------- ### PostgresCluster.spec.proxy.pgBouncer.containers[index].startupProbe.httpGet Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster-v1 HTTPGet specifies an HTTP GET request to perform. ```APIDOC ## PostgresCluster.spec.proxy.pgBouncer.containers[index].startupProbe.httpGet ### Description HTTPGet specifies an HTTP GET request to perform. ### Fields - **host** (`string`) - Optional - Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - **httpHeaders** (`[]object`) - Optional - Custom headers to set in the request. HTTP allows repeated headers. - **path** (`string`) - Optional - Path to access on the HTTP server. - **port** (`int or string`) - Required - Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - **scheme** (`string`) - Optional - Scheme to use for connecting to the host. Defaults to HTTP. ``` -------------------------------- ### Install Crunchy Postgres Operator using Helm Source: https://access.crunchydata.com/documentation/postgres-operator/latest/installation/helm Installs the Crunchy Postgres Operator directly from the Crunchy Data OCI registry. This is the primary method for a quick setup. ```bash helm install pgo oci://registry.developers.crunchydata.com/crunchydata/pgo ``` -------------------------------- ### Create Initialization SQL for Extension Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/extension-management Create an SQL file to automate the creation of extensions in specific databases. This example creates pgnodemx in the 'hippo' database. ```sql \c hippo\ CREATE EXTENSION pgnodemx; ``` -------------------------------- ### Get Primary Pod Name (PowerShell) Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/locale-and-encoding-settings Store the name of the primary database pod in an environment variable for easy access. This example uses PowerShell and targets a cluster named 'hippo'. ```powershell $env:PRIMARY_POD=(kubectl -n postgres-operator get pods --selector='postgres-operator.crunchydata.com/cluster=hippo,postgres-operator.crunchydata.com/role=master' -o jsonpath='{.items[*].metadata.labels.statefulset\.kubernetes\.io/pod-name}') ``` -------------------------------- ### Get Primary Pod Name (Bash) Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/locale-and-encoding-settings Store the name of the primary database pod in an environment variable for easy access. This example uses Bash and targets a cluster named 'hippo'. ```bash PRIMARY_POD=$(kubectl -n postgres-operator get pods --selector='postgres-operator.crunchydata.com/cluster=hippo,postgres-operator.crunchydata.com/role=master' -o jsonpath='{.items[*].metadata.labels.statefulset\.kubernetes\.io/pod-name}') ``` -------------------------------- ### Define OTLP Exporter Configuration Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/otel/exporters This snippet shows how to define an OTLP exporter configuration within the `instrumentation.config.exporters` section. The `endpoint` and `tls` settings are examples and should be adjusted based on your specific collector setup. ```yaml spec: instrumentation: config: exporters: otlp/logging: endpoint: a-standalone-collector:4317 tls: insecure: true otlp/metrics: endpoint: another-collector:4317 ``` -------------------------------- ### StartupProbe Configuration Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster Configure the startupProbe to define readiness conditions for a container. This probe is crucial for ensuring a container is ready to serve traffic before other probes are executed. If the startupProbe fails, the Pod will be restarted. ```APIDOC ## StartupProbe Configuration ### Description StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. ### Parameters #### StartupProbe Parameters - **exec** (`object`) - Optional - Exec specifies a command to execute in the container. - **failureThreshold** (`integer`) - Optional - Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - **grpc** (`object`) - Optional - GRPC specifies a GRPC HealthCheckRequest. - **httpGet** (`object`) - Optional - HTTPGet specifies an HTTP GET request to perform. - **initialDelaySeconds** (`integer`) - Optional - Number of seconds after the container has started before liveness probes are initiated. - **periodSeconds** (`integer`) - Optional - How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - **successThreshold** (`integer`) - Optional - Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - **tcpSocket** (`object`) - Optional - TCPSocket specifies a connection to a TCP port. - **terminationGracePeriodSeconds** (`integer`) - Optional - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). Minimum value is 1. - **timeoutSeconds** (`integer`) - Optional - Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. ``` -------------------------------- ### StartupProbe HTTPGet HTTPHeaders Configuration Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster Configure custom HTTP headers for the 'httpGet' probe. ```APIDOC ## StartupProbe.httpGet.httpHeaders[index] ### Description Custom headers to set in the request. HTTP allows repeated headers. ### Fields - **name** (`string`) - Required - The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. - **value** (`string`) - Required - The header field value ``` -------------------------------- ### Apply Kustomize Installation with Patch Source: https://access.crunchydata.com/documentation/postgres-operator/latest/installation/private-registries Apply the Kustomize installation manifest, which includes the patch for image pull secrets, to install Crunchy Postgres for Kubernetes from a private registry. ```bash kubectl apply --server-side -k kustomize/install/default ``` -------------------------------- ### StartupProbe Configuration Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster Configure the startup probe to determine when a Pod has successfully initialized. This probe is crucial for ensuring that the application is ready before other probes are executed or before the Pod is considered fully operational. If the startup probe fails, the Pod will be restarted. ```APIDOC ## StartupProbe ### Description StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. ### Fields - **exec** (`object`) - Optional - Exec specifies a command to execute in the container. - **failureThreshold** (`integer`) - Optional - Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - **grpc** (`object`) - Optional - GRPC specifies a GRPC HealthCheckRequest. - **httpGet** (`object`) - Optional - HTTPGet specifies an HTTP GET request to perform. - **initialDelaySeconds** (`integer`) - Optional - Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - **periodSeconds** (`integer`) - Optional - How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - **successThreshold** (`integer`) - Optional - Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - **tcpSocket** (`object`) - Optional - TCPSocket specifies a connection to a TCP port. - **terminationGracePeriodSeconds** (`integer`) - Optional - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - **timeoutSeconds** (`integer`) - Optional - Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes ``` -------------------------------- ### StartupProbe HTTPGet Configuration Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster Configure the 'httpGet' probe to perform an HTTP GET request to check the container's health. ```APIDOC ## StartupProbe.httpGet ### Description HTTPGet specifies an HTTP GET request to perform. ### Fields - **host** (`string`) - Optional - Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - **httpHeaders** (`[]object`) - Optional - Custom headers to set in the request. HTTP allows repeated headers. - **path** (`string`) - Optional - Path to access on the HTTP server. - **port** (`int or string`) - Required - Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. - **scheme** (`string`) - Optional - Scheme to use for connecting to the host. Defaults to HTTP. ``` -------------------------------- ### Example Operator Pod Output Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/basic-setup This is an example of the expected output when the Postgres Operator pod is healthy and running. ```text NAME READY STATUS RESTARTS AGE postgres-operator-9dd545d64-t4h8d 1/1 Running 0 3s ``` -------------------------------- ### Install Operator in Single-Namespace Mode Source: https://access.crunchydata.com/documentation/postgres-operator/latest/installation/kustomize Apply the kustomization file in the 'singlenamespace' folder to install the operator with only namespace permissions. ```bash kubectl apply --server-side -k config/singlenamespace ``` -------------------------------- ### Create ConfigMap for Initialization SQL Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/extension-management Create a Kubernetes ConfigMap from your initialization SQL file. Ensure the ConfigMap is in the same namespace as your PostgresCluster. ```bash kubectl create configmap hippo-init-sql -n postgres-operator --from-file=init.sql=path/to/init.sql ``` -------------------------------- ### Exec into Primary Pod and Connect to PostgreSQL Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/locale-and-encoding-settings Connect to your PostgreSQL instance by executing into the primary pod and using the psql command-line tool. This is the first step before running database commands. ```bash kubectl -n postgres-operator exec -it "$PRIMARY_POD" -- psql ``` ```powershell kubectl -n postgres-operator exec -it "$env:PRIMARY_POD" -- psql ``` -------------------------------- ### Connect to a Specific Database with psql Meta-Command Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/day-two/customize-cluster Use the `\c` meta-command within your initialization SQL to connect to a specific database (e.g., 'zoo') before executing further SQL statements. This is useful when managing multiple databases. ```sql \c zoo create table t_zoo as select s, md5(random()::text) from generate_Series(1,5) s; ``` -------------------------------- ### Configure Server Discovery with Various Label Selectors Source: https://access.crunchydata.com/documentation/postgres-operator/latest/guides/pgadmin/server-discovery Demonstrates different ways to configure `postgresClusterSelector` for discovering PostgresClusters. This includes matching specific labels, matching all clusters with an empty selector, and using label expressions. ```yaml spec: serverGroups: - name: demand postgresClusterSelector: matchLabels: owner: logistics - name: supply postgresClusterSelector: {} - name: maintenance postgresClusterSelector: matchExpressions: - { key: owner, operator: In, values: [logistics, transportation] } ``` -------------------------------- ### PostgresCluster.spec.proxy.pgBouncer.containers[index].startupProbe.exec Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster-v1 Exec specifies a command to execute in the container. ```APIDOC ## PostgresCluster.spec.proxy.pgBouncer.containers[index].startupProbe.exec ### Description Exec specifies a command to execute in the container. ### Fields - **command** (`[]string`) - Optional - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. ``` -------------------------------- ### PostgresCluster.spec.proxy.pgBouncer.containers[index].startupProbe Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster-v1 StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. ```APIDOC ## PostgresCluster.spec.proxy.pgBouncer.containers[index].startupProbe ### Description StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. ### Fields - **exec** (`object`) - Optional - Exec specifies a command to execute in the container. - **failureThreshold** (`integer`) - Optional - Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - **grpc** (`object`) - Optional - GRPC specifies a GRPC HealthCheckRequest. - **httpGet** (`object`) - Optional - HTTPGet specifies an HTTP GET request to perform. - **initialDelaySeconds** (`integer`) - Optional - Number of seconds after the container has started before liveness probes are initiated. - **periodSeconds** (`integer`) - Optional - How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - **successThreshold** (`integer`) - Optional - Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - **tcpSocket** (`object`) - Optional - TCPSocket specifies a connection to a TCP port. - **terminationGracePeriodSeconds** (`integer`) - Optional - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - **timeoutSeconds** (`integer`) - Optional - Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. ``` -------------------------------- ### PostgresCluster.spec.proxy.pgBouncer.containers[index].readinessProbe.exec Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster-v1 Configuration for readiness probes using exec commands. ```APIDOC ## PostgresCluster.spec.proxy.pgBouncer.containers[index].readinessProbe.exec ### Description Exec specifies a command to execute in the container. ### Parameters - **command** (`[]string`): Command is the command line to execute inside the container. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. ``` -------------------------------- ### StartupProbe Exec Configuration Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster Configure the 'exec' probe to run a command within the container to determine its health. ```APIDOC ## StartupProbe.exec ### Description Exec specifies a command to execute in the container. ### Fields - **command** (`[]string`) - Optional - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. ``` -------------------------------- ### Install with Custom Values File Source: https://access.crunchydata.com/documentation/postgres-operator/latest/installation/helm Installs the Crunchy Postgres Operator using a custom values file. This is the recommended approach for managing multiple configuration changes. ```bash helm install pgo oci://registry.developers.crunchydata.com/crunchydata/pgo -f my-values.yaml ``` -------------------------------- ### Create a Simple Postgres Cluster Source: https://access.crunchydata.com/documentation/postgres-operator/latest/quickstart Apply the kustomize configuration to create a basic Postgres cluster named 'hippo'. ```bash kubectl apply -k kustomize/postgres ``` -------------------------------- ### Install Crunchy Postgres for Kubernetes with Helm Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/basic-setup/create-cluster Install the Crunchy Postgres for Kubernetes operator using Helm. This command sets up the necessary components for managing Postgres clusters. ```bash helm install cpk helm/install --namespace postgres-operator --create-namespace ``` -------------------------------- ### StartupProbe GRPC Configuration Source: https://access.crunchydata.com/documentation/postgres-operator/latest/references/crd/6.0.x/postgrescluster Configure the 'grpc' probe for gRPC health checking. ```APIDOC ## StartupProbe.grpc ### Description GRPC specifies a GRPC HealthCheckRequest. ### Fields - **port** (`integer`) - Required - Port number of the gRPC service. Number must be in the range 1 to 65535. - **service** (`string`) - Optional - Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC. ``` -------------------------------- ### Install Crunchy Postgres Operator Source: https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/basic-setup Install the Crunchy Postgres Operator using server-side apply with kustomize. This command deploys the necessary containers and configurations into the specified namespace. ```bash kubectl apply --server-side -k kustomize/install/default ```