# Crossplane configuration Once Crossplane [is installed](applications.md#crossplane), it must be configured for use. The process of configuring Crossplane includes: 1. Configuring RBAC permissions. 1. Configuring Crossplane with a cloud provider. 1. Configure managed service access. 1. Setting up Resource classes. 1. Using Auto DevOps configuration options. 1. Connect to the PostgreSQL instance. To allow Crossplane to provision cloud services such as PostgreSQL, the cloud provider stack must be configured with a user account. For example: - A service account for GCP. - An IAM user for AWS. Important notes: - This guide uses GCP as an example. However, the process for AWS and Azure will be similar. - Crossplane requires the Kubernetes cluster to be VPC native with Alias IPs enabled so that the IP address of the pods are routable within the GCP network. First, we need to declare some environment variables with configuration that will be used throughout this guide: ```sh export PROJECT_ID=crossplane-playground # the GCP project where all resources reside. export NETWORK_NAME=default # the GCP network where your GKE is provisioned. export REGION=us-central1 # the GCP region where the GKE cluster is provisioned. ``` ## Configure RBAC permissions - For a non-GitLab managed cluster(s), ensure that the service account for the token provided can manage resources in the `database.crossplane.io` API group. Manually grant GitLab's service account the ability to manage resources in the `database.crossplane.io` API group. The Aggregated ClusterRole allows us to do that. ​ NOTE: **Note:** For a non-GitLab managed cluster, ensure that the service account for the token provided can manage resources in the `database.crossplane.io` API group. ​1. Save the following YAML as `crossplane-database-role.yaml`: ```sh cat > crossplane-database-role.yaml < network.yaml < gcp-postgres-standard.yaml < Annotations: crossplane.io/propagate-from-name: 108e460e-06c7-11ea-b907-42010a8000bd crossplane.io/propagate-from-namespace: gitlab-managed-apps crossplane.io/propagate-from-uid: 10c79605-06c7-11ea-b907-42010a8000bd Type: Opaque Data ==== privateIP: 8 bytes publicIP: 13 bytes serverCACertificateCert: 1272 bytes serverCACertificateCertSerialNumber: 1 bytes serverCACertificateCreateTime: 24 bytes serverCACertificateExpirationTime: 24 bytes username: 8 bytes endpoint: 8 bytes password: 27 bytes serverCACertificateCommonName: 98 bytes serverCACertificateInstance: 41 bytes serverCACertificateSha1Fingerprint: 40 bytes ``` ## Connect to the PostgreSQL instance Follow this [GCP guide](https://cloud.google.com/sql/docs/postgres/connect-kubernetes-engine) if you would like to connect to the newly provisioned Postgres database instance on CloudSQL.