postgres
33 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.
Change your Cloud SQL instance
Nais no longer provides database migration tooling. Choose the procedure for the change you need. Upgrade PostgreSQL on your existing instance. You do not need to migrate to a new instance. Plan forβ¦
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.
Cloud SQL System Users and Roles
Every Cloud SQL PostgreSQL instance comes with a fixed set of system users and roles managed by Google. On top of these, Nais creates application-specific users via ConfigConnector. Understandingβ¦
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. Remove unused databases to avoid incurring unnecessary costs. This is done by setting cascadingDelete in yourβ¦
Deleting the database
This page guides you through the steps required to delete a Postgres cluster. Ensure that all references to the Postgres instance are removed from your workload manifests:
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
nais cloudsql prepare grants PostgreSQL privileges, not login access. By default, it grants USAGE on the schema and SELECT on existing tables and sequences to cloudsqliamuser. It also sets defaultβ¦
Legacy Cloud SQL migration (deprecated)
The CLI saves migration configuration in the cluster and launches Naisjobs running cloudsql-migrator <span class="emoji-icon"><svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px"β¦
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. A Postgres is a logical database: pgrator creates its default main branch asβ¦
Non-personal database users
This page documents the non-personal users in Google Cloud SQL for PostgreSQL on Nais. It covers the default setup (golden path). Manual deviations β such as setting a password on the postgres userβ¦
Personal database access
Use your personal Google account to access a Cloud SQL database. Database privileges and login access are separate: prepare grants PostgreSQL privileges, but does not create an IAM database user orβ¦
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:
Restore a database from a daily backup
This page describes how to restore a Cloud SQL Postgres database from one of the automated daily backups that Nais takes of your instance.
Shrink Cloud SQL disk size
Shrink storage on your existing instance using gcloud. Follow Google's storage shrink procedure <span class="emoji-icon"><svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0β¦
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):