Overview
This guide covers a complete, production-ready deployment of CrewAI Enterprise on Google Kubernetes Engine with the following stack:- GKE with Workload Identity (no static credentials)
- Cloud SQL for PostgreSQL 16 via Cloud SQL Auth Proxy
- GCS for object storage with IAM-signed URLs
- Artifact Registry for crew container images
- NGINX Ingress for TLS termination
- WorkOS AuthKit for SSO
- Wharf for OTLP trace collection (enabled by default)
- Studio V2 (post-install configuration — no Helm values exist for this)
Prerequisites Checklist
Complete every item before runninghelm install.
GCP Infrastructure
- GKE cluster running Kubernetes 1.28+ with Workload Identity enabled
-
gcloudCLI andkubectlconfigured against the target cluster - Helm 3.10+ installed
- Required GCP APIs enabled (see below)
- Cloud SQL for PostgreSQL 16 instance created
-
cloudsql.iam_authentication=onflag set on the instance - All four databases created:
crewai_plus_production,crewai_plus_cable_production,crewai_plus_oauth_production,wharf - IAM database user created and privileges granted on all four databases
- GCS bucket created for object storage
-
roles/storage.objectAdminandroles/iam.serviceAccountTokenCreatorgranted to the GSA
- Docker repository created with mutable tags (CrewAI overwrites tags)
-
roles/artifactregistry.writergranted to the GSA - Node pool compute SA granted
roles/artifactregistry.reader
- WorkOS application created with redirect URI
https://<YOUR_DOMAIN>/auth/workos/callback - WorkOS API key, Client ID, and AuthKit domain noted
- 32-character cookie password generated
- DNS record pointing
<YOUR_DOMAIN>to your NGINX ingress IP or reserved static IP - TLS certificate in a Kubernetes Secret named
crewai-tlsin thecrewainamespace
Step 1: Enable Required GCP APIs
Step 2: Create the GCP Service Account
All CrewAI workloads share a single GSA mapped to the Kubernetes ServiceAccount via Workload Identity.Step 3: Grant IAM Roles
Step 4: Bind Workload Identity
Step 5: Create Cloud SQL Databases
Enable IAM authentication on the instance, then create all four required databases.Create the IAM Database User
Grant Privileges
Connect to the Cloud SQL instance and grant the IAM user access to all four databases. ReplaceGSA_NAME@GCP_PROJECT_ID.iam with your actual value (e.g., crewai-platform@my-project.iam):
Step 6: Create GCS Bucket
Step 7: Create Artifact Registry Repository
CREW_IMAGE_REGISTRY_OVERRIDE value is this prefix without the /crewai-enterprise suffix — the platform appends that automatically.
Step 8: Configure WorkOS
- In the WorkOS Dashboard, navigate to Applications → Create Application (name it e.g.,
CrewAI Platform) - Add redirect URI:
https://<YOUR_DOMAIN>/auth/workos/callback - Note your Client ID from the application main page
- Navigate to Developer → Domains and note your AuthKit domain
- Navigate to the main API Keys page and copy your API key (starts with
sk_live_) - Generate a cookie password (must be 32 characters or fewer):
| cut -c -32 truncation is mandatory. WorkOS silently rejects cookie passwords longer than 32 characters — the install succeeds but all authentication attempts fail.
Complete values.yaml
Replace all<PLACEHOLDER> values before running helm install.
values.yaml
Step 9: Install
Running within a few minutes. If any pod shows CrashLoopBackOff or Error, check logs before proceeding:
Step 10: Post-Install Annotations
After the first install, thecrewai-crews namespace is created automatically. Annotate its default ServiceAccount so build pods can authenticate to Artifact Registry via Workload Identity:
Step 11: Required Post-Install Commands
Run these commands in order. Each must complete before proceeding to the next.factory:grant_admin is the correct command for WorkOS SSO. This is distinct from Entra ID deployments, which use Azure App Roles instead.factory:grant_admin will fail if the user has not yet authenticated through WorkOS. Have the admin log in via the web UI first, then run the command.Step 12: Enable Studio V2
12a: Create the LLM Connection (UI)
- Navigate to Settings → LLM Connections
- Click New Connection
- Set the name to exactly
studio-v2(lowercase, no spaces — the install commands in 12c look up this name specifically) - Select your LLM provider, enter the model name and API key
- Click Save
12b: Set as Default Connection (UI)
- Navigate to Settings → Crew Studio
- Under Default Connection, select
studio-v2 - Click Save
12c: Run Install Commands
Run these in order. Each must complete successfully before running the next.Step 13: Verify
Platform health
WorkOS authentication
Navigate tohttps://<YOUR_DOMAIN>. You should be redirected to the WorkOS AuthKit login page.
If authentication fails, check that both WorkOS keys are present in the pod:
envVars: in values.yaml — not secrets: — and run helm upgrade.
WorkOS redirect URI
If you see a “redirect_uri_mismatch” error in the WorkOS dashboard, confirm the redirect URI in WorkOS exactly matches:GCS signed URLs
If file uploads or downloads fail withSignedUrlUnavailable, confirm:
roles/iam.serviceAccountTokenCreator.
Wharf trace collection
Studio V2
studio-assistant and studio-runner deployments should show Running.
Troubleshooting
WorkOS auth fails with no clear error
BothWORKOS_API_KEY and WORKOS_COOKIE_PASSWORD are absent from the pod. Move them from secrets: to envVars: and run helm upgrade.
WORKOS_COOKIE_PASSWORD rejected silently
The password exceeds 32 characters. Regenerate:openssl rand -base64 32 | cut -c -32.
GCS signed URLs fail at runtime (install succeeds)
GCS_IAM_SIGNING is missing from envVars. This error only appears when users try to access uploaded files — the install itself succeeds, making it easy to miss. Add GCS_IAM_SIGNING: "true" and run helm upgrade.
OAuth service connects to wrong database
POSTGRES_OAUTH_DB is not set in envVars. The chart default oauth_db does not match the crewai_plus_oauth_production database you created. Add the override explicitly.
Cloud SQL connection refused on 127.0.0.1
The Cloud SQL Auth Proxy sidecar is not running. Check:cloudSqlProxy.instanceConnectionName matches the output of:
IAM database auth fails
Check that:cloudsql.iam_authentication=onflag is set on the instanceDB_USERis the GSA email without.gserviceaccount.com(e.g.,crewai-platform@my-project.iam)- The IAM database user exists:
gcloud sql users list --instance=$SQL_INSTANCE
502 errors from NGINX
web.enableSslFromPuma is not set to false. When NGINX handles TLS termination, Puma must not also attempt SSL. Set enableSslFromPuma: false in your web: block and run helm upgrade.
Crew image pushes fail (unauthorized)
Thedefault ServiceAccount in crewai-crews is missing the Workload Identity annotation. Run:
studio:agent:install fails
Thestudio-v2 LLM Connection does not exist yet. Complete Steps 12a and 12b in the UI, then re-run the command.