postgres
30 pagesAdditional users
You can add users to your database by setting database configuration option: .spec.gcp.sqlInstances[].databases[].users[].name. Additional users needs to manually be given access to the database andβ¦
Certification sync issues
If you have deleted your application and recreate it, there might be an issue that your new app will not be able to create a client certificate because the old one still exists. Your deploy may failβ¦
Change the tier of your database instance
Choosing an appropriate tier depends on your application's requirements such as: The tier you choose will affect the performance and cost of your database.
Cloud SQL credentials
Cloud SQL uses ConfigConnector/CNRM to create and manage all relevant resources (sqldatabase, sqlinstance, sqluser, credentials) for postgreSQL. When creating an application via your nais.yaml theβ¦
Cloud SQL Instance
A Cloud SQL instance is a managed database server provided by Google Cloud Platform. In nais, these are used to provide PostgreSQL databases for your applications.
Cloud SQL Proxy
The application will connect to the database using Cloud SQL Proxy, ensuring that the database communication happens in secure tunnel, authenticated with automatically rotated credentials.
Connect from laptop
In the event of problems that can not be resolved via the application, a developer might need to access the database directly.
Connect to a cloned database
If you have for some reason cloned a database in the console, you need to do some manually changes on the new database to be allowed to connect to it with your.
Debugging
When issues arise with your Postgres cluster, you can use the following steps to troubleshoot the problem.
Debugging
When issues arise with your Cloud SQL instance, you can use the following steps to troubleshoot the problem.
Deleting the database
The database is not automatically removed when deleting your Nais application or the Postgres resource. Remove unused databases to avoid incurring unnecessary costs. This is done by settingβ¦
Deleting the database
The database is not automatically removed when deleting your Nais application. Remove unused databases to avoid incurring unnecessary costs. This is done by setting cascadingDelete in yourβ¦
Enable audit logging
This guide describes how to enable audit logging in your postgreSQL database. The following steps need to be taken to enable the logging.
Failing to assign private IP to an existing Cloud SQL instance
If you have deleted your application and recreate it, there might be an issue that your new app will not be able to create a client certificate because the old one still exists. Your deploy may failβ¦
Grants and privileges
When using the nais postgres prepare command, the user is granted some privileges in the database. By default, the user is granted SELECT privileges on all tables and sequences in the default schema.
Migrate to new instance
This guide describes how to migrate your PostgreSQL database to a new SQLInstance. The process can be summarized as follows:
Migrate to new instance
This article desribes what actually happens when you use the nais tools to migrate for a new SQL Instance.
Migrating databases to GCP
Suggested patterns for moving on-prem databases to GCP postgreSQL. Disclaimer: These are options for migrations to GCP postgreSQL. Others may work better for your team.
Nais Postgres example YAML
This is a complete example of a Postgres resource, commonly known as the postgres.yaml file. For an in-depth explanation of each field, head over to the reference documentation.
Nais Postgres reference
This document describes all possible configuration values in the Postgres spec, commonly known as the postgres.yaml file.
Personal database access
Databases should always be accessed using a personal account, and the access should ideally be temporary.
Postgres cluster
Postgres is a managed database cluster provided by nais utilizing the Zalando postgres-operator. You manage your cluster by defining a Postgres manifest.
Postgres database metrics
All PostgreSQL databases running in the cluster export metrics using the Prometheus postgres exporter.
Postgres database metrics
All Postgres databases running on Google Cloud Platform are integrated with Cloud Monitoring to provide metrics and alerts. You can use these metrics to monitor the health and performance of yourβ¦
Postgres reference
The full configuration options for the Postgres instance can be found in the Postgres resource reference.
Postgres reference
The full configuration options for the Postgres instance can be found in the application spec reference.
Reset database credentials
To reset the database credentials for your application (if application name, database name or envVarPrefix has been changed), you need to first delete the secret and sqluser for the database:
Upgrade major version
This page describes how to upgrade the major version of your PostgreSQL database. Before doing a major version upgrade, consult the PostgreSQL Release Notes for any preparation that needs to be done.
Upgrade major version
This page describes how to upgrade the major version of your PostgreSQL database. Before doing a major version upgrade, consult the Google Cloud SQL documentation for any preparation that needs to beβ¦
Workaround for password synchronization issues
We recommend using nais-cli for rotating password for your Postgres database user. Retrieve the password from the secret google-sql-MYAPP in your namespace (the password is base64 encoded):