Skip to main content

EvolutionAPI on GKE Autopilot

EvolutionAPI on GKE Autopilot

Evolution API is an open-source Node.js WhatsApp Business API gateway (built on the Baileys library) that provisions WhatsApp instances, sends and receives messages, and exposes a REST API plus a manager UI for wiring WhatsApp into other systems. This module deploys Evolution API on GKE Autopilot on top of the App_GKE foundation, which provisions and manages the shared Google Cloud and Kubernetes infrastructure.

This guide focuses on the cloud services Evolution API uses and how to explore and operate them from the Google Cloud Console and the command line. For the mechanics that are common to every GKE application — Workload Identity, ingress, autoscaling, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC Service Controls, backups, and the deployment lifecycle — refer to the App_GKE foundation guide rather than repeating them here.


What Evolution API costs on RAD, and how that compares​

In a Google Cloud project you own, Evolution API on RAD's GKE Autopilot module costs about US$150 a month, plus US$30 once per deployment and no per-user licence. For the lowest cost, the Cloud Run module runs the same Evolution API for about US$181 a month. Evolution API is an open-source WhatsApp Business API gateway used to send and receive messages and manage multiple instances programmatically. Figures are as at 8 October 2026; sources are listed at the end of this section.

If this runs in a project RAD manages for you, it can be deleted and restored within 30 days for a few credits instead of sitting there running — so an occasional-use deployment costs a few dollars a month, not US$150. See Pause it for free, below.

What you pay on RAD​

In a Google Cloud project you ownIn a project RAD manages for you
Module fee, once per deployment300 credits (US$30 at the top-up price)270 credits (10% lower)
Build timeA few credits per buildThe same
Google Cloud running costBilled by Google to your own billing account, about US$150 a month for the default configuration (table below)Metered hourly in credits; RAD publishes 111 credits a day, about 3,330 a month (about US$333 at the top-up price)
Who owns whatYou own the project and its billing; RAD deploys and updates itRAD owns the project, with guardrails, quotas and budget alerts; you get console access, and a minimum purchased balance is held in reserve

10 credits cost US$1 on a one-off top-up, and less on a monthly plan. In a project RAD manages, the database, file server and network are shared by every application in the project, so a second application does not add a second database.

Default running cost in your own project (us-central1, Google list prices):

Resource (module default)Per month
GKE Autopilot pod, 2 vCPU / 4 GiB, running all the timeUS$79
Cloud SQL for PostgreSQL, 1 vCPU / 3.75 GB, zonal, 10 GB SSDUS$51
NFS/cache file server: a small VMUS$13
Cloud NAT gateway and IP addressUS$5
Cloud Storage for add-ons and backupsUS$1
Totalabout US$150

GKE's free tier covers the management fee of one Autopilot or zonal cluster per billing account, so the total above assumes this is that cluster; otherwise add about US$73 a month.

How it compares​

We could not find a commercial managed/SaaS plan specifically for Evolution API itself as at 8 October 2026, so the honest comparison is against running it yourself:

OptionPer monthWho runs it
Hetzner CPX22 (2 vCPU/4GB)~US$24You: OS, updates, backups, security patches
DigitalOcean 2 vCPU/4GB DropletUS$24You: OS, updates, backups, security patches
GCP Compute Engine e2-standard-2 (2 vCPU/8GB)~US$49You: OS, updates, backups, security patches
RAD, GKE Autopilot, your own projectUS$150, plus US$30 onceRAD's automation, in your project
RAD, Cloud Runabout US$181; see the Cloud Run guideRAD
  • RAD is usually not cheaper in cash than a bare VPS — the difference is what is managed for you. A VPS price does not include the admin's own time for backups, security patches and OS upgrades; RAD's managed Cloud SQL (where this app uses a database), Secret Manager and monitoring cover that instead.
  • Evolution API is an open-source WhatsApp Business API gateway used to send and receive messages and manage multiple instances programmatically. That shapes which column matters: predictable, hands-off operation is worth more to most teams running this kind of tool than shaving a few dollars off the monthly bill.

Pause it for free: delete a RAD-managed project, restore it when you need it​

If Evolution API runs in a project RAD manages for you, you have an option beyond scaling down: delete the whole project, and restore it within 30 days for close to nothing. This suits a deployment you only need occasionally — studying for a certification, a demo, a seasonal need — far better than running it continuously.

  • How it works. Deleting a RAD-managed project unlinks its billing first, then asks Google to delete the project. Google does not remove it immediately: it keeps it, recoverable, for 30 days, and because billing is already unlinked, nothing is charged while it waits. Unlike deleting one module, this does not tear down Cloud SQL, the VM or GKE Autopilot one by one — the whole project, and everything in it, simply stops.
  • Restoring costs a handful of credits, not a rebuild. Within 30 days, the project's owner can restore it. RAD asks Google to undelete the project and reattaches its billing account, then asks you to run Update on each deployment to confirm everything came back. Because nothing was individually destroyed, that Update finds the same resources already there — it is a check, not a rebuild, and an Update never charges the module fee again. That costs a handful of build-time credits in total (under US$1) for a typical 2–3-deployment chain.
  • So a month of occasional use can cost a few dollars, not US$150. Deploy Evolution API, use it for a session, delete the project. Restore it next time you want it, confirm with Update, and delete it again when you're done. You pay only for the module fee once, the builds, and whatever hours it was actually live.
  • What this needs. You must own the project (not a bring-your-own one RAD only manages billing for), and you restore it yourself within the 30 days — after that, Google deletes it for good. Restoring is admitted like creating a new project: your purchased credit balance must still clear the tier's floor (100 credits for the sandbox tier most study/demo use fits). Google says most services are fully working again within 36 hours of a restore.
  • One real gap: nightly backups do not survive. Backups are written to a bucket inside the project, and that bucket has Cloud Storage's soft-delete explicitly turned off, so it is very likely gone as soon as you delete the project — even though the project itself is recoverable for 30 days. If you've customised this deployment and want to keep that work, copy a backup out (to Google Drive, or a bucket outside the project) before deleting. For a default install with nothing irreplaceable in it, this does not matter.

Pay only while you use it, the other way: delete and redeploy​

GKE keeps at least one pod running, so Evolution API never scales to zero on its own. The option above only applies to a RAD-managed project; in your own project, or once the 30-day window has passed, the way to stop paying is to delete the deployment and deploy it again when you need it.

  • What a redeploy costs. The module fee again plus the builds: about 305 credits (US$30.50). Deleting saves money if Evolution API would otherwise sit unused for about 7 days or more in your own project (about US$5 a day), or about 3 days or more in a RAD-managed one (111 credits a day).
  • Delete everything Evolution API uses. Most of the running cost is usually the database and any shared file/cache VM. They stop only when nothing else in the project uses them, so deleting this app while something else shares the project saves only this app's own compute part.
  • Keep data first. Nightly backups go to a bucket inside the deployment and are deleted with it, so copy the latest backup out before deleting if you want to keep it.
  • Note your settings. RAD does not recreate a deleted deployment for you; you enter the settings again when you deploy.

Lab sessions and Managed Environments​

  • Lab sessions, for training. A trainer runs a session for a class. Each participant gets Evolution API in their own Google Cloud project for 15 minutes to 24 hours, within an allowance the trainer sets. Either the trainer funds every place, or each participant pays for their own. Everything is deleted when the session ends and unused credits go back to the trainer.
  • Managed Environments, for consultancies. A partner runs the app for a client from a ring-fenced wallet it funds, and settles with the client directly. If the wallet runs low, billing pauses and the data is kept, so nobody receives an unexpected charge. At the end the partner hands the project over and the deployments become the client's own.

Credits can be bought in more than 20 currencies, including XAF, XOF, NGN, GHS, KES and ZAR, by card, bank transfer or mobile money.

Sources (8 October 2026): Google Cloud list prices from the Cloud Billing Catalog API; RAD's own fees and daily-credit estimate from radmodules.dev/pricing; Delete and restore projects for the pause/restore mechanism. Prices change; check each source before relying on a figure.

1. Overview​

Evolution API runs as a Node.js web workload on GKE Autopilot. The deployment wires together a focused set of Google Cloud services:

CapabilityGoogle Cloud serviceNotes
ComputeGKE AutopilotNode.js pod, 2 vCPU / 4 GiB by default; pinned to a single replica
DatabaseCloud SQL for PostgreSQL 15Required — Evolution API uses Prisma against PostgreSQL only
CacheRedisEnabled by default (CACHE_REDIS_URI); caches instance/message state
Object storageCloud StorageA dedicated data bucket provisioned automatically
SecretsSecret ManagerAuto-generated AUTHENTICATION_API_KEY; database password
IngressCloud Load BalancingExternal LoadBalancer with ClientIP session affinity; optional custom domain + managed certificate

Sensible defaults worth knowing up front:

  • PostgreSQL 15 is mandatory. The database engine is fixed by the shared application layer; Evolution API uses Prisma and does not support other engines.
  • The workload is pinned to a single replica (min_instance_count = 1, max_instance_count = 1). Evolution API holds live WhatsApp (Baileys) socket sessions in memory, per-pod; those sessions are not shared across replicas, so scaling out fragments live connections. Do not raise max_instance_count.
  • AUTHENTICATION_API_KEY is generated automatically and stored in Secret Manager. It is Evolution API's global admin key and must never be rotated after first boot — rotating it makes already-provisioned WhatsApp instances unreachable and returns 401 to every client still holding the old key.
  • Redis is enabled by default (enable_redis = true). Leave redis_host empty to use the NFS server VM's IP as the Redis endpoint (requires enable_nfs = true), or point it at an explicit managed instance.
  • Session affinity is ClientIP and the Service type is LoadBalancer by default, exposing an external IP for WhatsApp webhook callbacks and the manager UI.
  • Memory defaults to 4 GiB — Evolution API needs at least 2 GiB for reliable operation.
  • SERVER_URL is defaulted at runtime by the container entrypoint from the injected service URL, so QR-code and webhook callback URLs reflect the real address.

2. Google Cloud Services & How to Explore Them​

All commands assume you have run gcloud container clusters get-credentials <cluster> --region <region> --project <project> and that PROJECT, REGION, and NAMESPACE are set. The namespace and other identifiers are reported in the deployment Outputs.

A. GKE Autopilot — the Evolution API workload​

Evolution API pods are scheduled on Autopilot, which bills for the CPU/memory the pods actually request. The workload runs as a single replica by design.

  • Console: Kubernetes Engine → Workloads → select the Evolution API workload to see pods, revisions, and events. Kubernetes Engine → Services & Ingress shows the external IP.
  • CLI:
    kubectl get pods,svc -n "$NAMESPACE"
    kubectl logs -n "$NAMESPACE" deploy/<service-name> --tail=100
    kubectl describe pod -n "$NAMESPACE" -l app=<service-name>

See App_GKE for how Autopilot, scaling, and the workload type (Deployment vs StatefulSet) are managed.

B. Cloud SQL for PostgreSQL 15​

Evolution API stores all application data (WhatsApp instances, contacts, chats, message history) in a managed Cloud SQL for PostgreSQL 15 instance. Pods reach it privately through the Cloud SQL Auth Proxy sidecar over a TCP loopback (127.0.0.1); no public IP is exposed. On first deploy an initialization Job creates the application database and user; Prisma migrations then create the schema on container boot.

  • Console: SQL → select the instance for connections, backups, flags, and metrics.
  • CLI:
    gcloud sql instances list --project "$PROJECT"
    gcloud sql instances describe <instance-name> --project "$PROJECT"
    # Open an interactive shell to inspect schema/data:
    gcloud sql connect <instance-name> --user=evolution --database=evolution --project "$PROJECT"

The instance name, database (evolution), user (evolution), and the Secret Manager secret holding the password are all surfaced in the Outputs. For the connection model, automated backups, and password rotation, see App_GKE.

C. Cloud Storage​

A dedicated Cloud Storage data bucket is provisioned automatically for Evolution API file storage. The workload service account is granted access. Additional buckets can be declared via storage_buckets.

  • Console: Cloud Storage → Buckets.
  • CLI:
    gcloud storage buckets list --project "$PROJECT"
    gcloud storage ls gs://<data-bucket>/ # bucket name is in the Outputs

See App_GKE for CMEK options and GCS Fuse mounts.

D. Redis (cache)​

Redis is enabled by default (enable_redis = true). Evolution API uses it for instance/message caching (CACHE_REDIS_URI, Redis DB index 6). When redis_host is left empty and enable_nfs = true, the NFS server VM's IP is used as the Redis endpoint; the container entrypoint assembles the URI at runtime.

  • Console: Memorystore → Redis (if using a managed instance).
  • CLI:
    redis-cli -h <redis-host> ping
    redis-cli -h <redis-host> info keyspace
    # Confirm the cache URI is injected into the running pod:
    kubectl exec -n "$NAMESPACE" deploy/<service-name> -- env | grep CACHE_REDIS

E. Secret Manager​

One cryptographic secret is generated automatically and stored in Secret Manager: AUTHENTICATION_API_KEY — Evolution API's global admin API key, mounted via the Secret Store CSI driver. The database password is managed separately by the foundation.

  • Console: Security → Secret Manager.
  • CLI:
    gcloud secrets list --project "$PROJECT" --filter="name~api-key"
    gcloud secrets versions access latest --secret=<secret-name> --project "$PROJECT"

The database password secret name is in the Outputs. See App_GKE for the Secret Store CSI integration and rotation.

F. Networking & ingress​

By default the workload is exposed through an external Cloud Load Balancing IP with ClientIP session affinity — required so a WhatsApp client's requests stick to the single pod holding its socket. A custom domain with a Google-managed certificate can be enabled, and a static IP can be reserved so the address survives redeploys.

  • Console: Network services → Load balancing; VPC network → IP addresses.
  • CLI:
    kubectl get ingress,svc -n "$NAMESPACE"
    gcloud compute addresses list --project "$PROJECT"

See App_GKE for custom domains, Cloud CDN, and static IP details.

G. Cloud Logging & Monitoring​

Pod stdout/stderr flow to Cloud Logging; GKE and Cloud SQL metrics flow to Cloud Monitoring. The entrypoint emits [cloud-entrypoint] markers that confirm the resolved DB/Redis/URL config on boot. Optional uptime checks and alert policies are available.

  • Console: Logging → Logs Explorer; Monitoring → Dashboards / Alerting.
  • CLI:
    gcloud logging read 'resource.type="k8s_container" AND resource.labels.namespace_name="'"$NAMESPACE"'"' \
    --project "$PROJECT" --limit 50

3. EvolutionAPI Application Behaviour​

  • First-deploy database setup. An initialization Job runs db-init.sh using postgres:15-alpine. It connects through the Cloud SQL Auth Proxy and idempotently creates the evolution database and role, grants privileges, and makes the app user the owner of the public schema, then signals the proxy sidecar to shut down so the Job pod completes. The job is safe to re-run.
  • Prisma migrations on start. Evolution API runs prisma migrate deploy on every container boot (via the wrapped deploy_database.sh), so upgrading the application version applies schema changes without a separate migration step. On GKE the cloud-sql-proxy sidecar is a TCP loopback, so the entrypoint connects with sslmode=disable.
  • AUTHENTICATION_API_KEY is immutable after first boot. The global admin key is generated once and written to Secret Manager. Rotating it makes all already-provisioned WhatsApp instances unreachable and returns 401 to every client still holding the old key. Only rotate during a planned migration.
  • Single-replica by design. WhatsApp (Baileys) socket sessions live in the pod's memory and are not shared across replicas. min_instance_count = 1 keeps one running; max_instance_count = 1 prevents fragmenting live connections. Do not scale out. ClientIP session affinity keeps each client pinned to the pod.
  • Webhook / QR callback URL. The entrypoint defaults SERVER_URL to the injected service URL. After the LoadBalancer external IP is assigned, set SERVER_URL (via environment_variables) to the external URL so QR-code and webhook callbacks use a reachable address:
    kubectl get svc <service-name> -n "$NAMESPACE" \
    -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
  • First-run setup. After deploy, retrieve AUTHENTICATION_API_KEY from Secret Manager and use it (as the apikey header) to reach the manager UI at /manager, create a WhatsApp instance (POST /instance/create), then scan the returned QR code from WhatsApp on your phone to connect the number.
  • Health path. Startup and liveness probes target the root / — an unauthenticated status endpoint that responds once the server is up. Allow several minutes on first boot while Prisma migrations run.

4. Configuration Variables​

Variables are grouped exactly as they appear on the deployment platform. Only settings specific to or notable for Evolution API are listed; every other input is inherited from App_GKE with its standard behaviour and defaults.

Group 1 — Project & Identity​

VariableDefaultDescription
project_id(required)Target Google Cloud project.
regionus-central1Region for the workload and regional resources.

All other inputs follow standard App_GKE behaviour.

Group 3 — Application Identity​

VariableDefaultDescription
application_nameevolutionapiBase name for resources. Do not change after first deploy.
application_versionv2.1.1Evolution API image tag; latest maps to a pinned v2.1.1 in the build arg.

All other inputs follow standard App_GKE behaviour.

Group 4 — Runtime & Scaling​

VariableDefaultDescription
deploy_applicationtrueSet false to provision infrastructure only.
min_instance_count1Minimum pod replicas; keeps one running for the in-memory WhatsApp sockets.
max_instance_count1Pinned to 1. Do not raise — sessions are not shared across pods.
container_port8080Evolution API listens on port 8080 (SERVER_PORT).
enable_cloudsql_volumetrueCloud SQL Auth Proxy sidecar for PostgreSQL connectivity.

All other inputs follow standard App_GKE behaviour.

Group 6 — GKE Backend & Cluster​

VariableDefaultDescription
service_typeLoadBalancerExposes an external IP for webhook callbacks and the manager UI.
workload_typenull (auto-resolves to Deployment)Stateless Deployment (all state lives in PostgreSQL + Redis).
session_affinityClientIPSticky routing so a client's requests reach the pod holding its WhatsApp socket.

All other inputs follow standard App_GKE behaviour.

Group 13 — Filesystem (NFS)​

VariableDefaultDescription
enable_nfstrueProvisions the NFS server VM, which also co-locates the Redis endpoint (see Group 15).

All other inputs follow standard App_GKE behaviour.

Group 15 — Redis Cache​

VariableDefaultDescription
enable_redistrueEnables Evolution API's Redis cache (CACHE_REDIS_URI).
redis_host""Redis endpoint. Leave empty to use the NFS server IP (requires enable_nfs = true).
redis_port6379Redis port.
redis_auth""Optional Redis auth password (sensitive).

All other inputs follow standard App_GKE behaviour.

Group 16 — Database Backend​

VariableDefaultDescription
application_database_nameevolutionPostgreSQL database name. Immutable after first deploy.
application_database_userevolutionApplication database user. Immutable after first deploy.

All other inputs follow standard App_GKE behaviour.


5. Outputs​

These values are returned on a successful deployment and are the quickest way to locate and explore the running resources.

OutputDescription
service_nameKubernetes Service name.
namespaceNamespace the workload runs in.
service_cluster_ipIn-cluster ClusterIP.
stage_service_cluster_ipsMap of ClusterIPs for stage-specific services.
service_external_ipExternal LoadBalancer IP (when a static IP is reserved).
service_urlURL to reach Evolution API.
database_instance_nameCloud SQL instance name.
database_nameApplication database name.
database_userApplication database user.
database_password_secretSecret Manager secret holding the DB password.
database_host / database_portDB endpoint (127.0.0.1 via the Auth Proxy) / port.
storage_bucketsCreated Cloud Storage buckets.
network_name / network_exists / regionsVPC network, presence, available regions.
container_image / container_registryDeployed image and Artifact Registry repo.
monitoring_enabled / monitoring_notification_channelsMonitoring status and channels.
initialization_jobs / db_import_jobNames of the setup and (optional) import jobs.
deployment_id / tenant_id / resource_prefixNaming identifiers.
project_id / project_numberProject identifiers.
cicd_enabled / cicd_configurationCI/CD status and details (repo, trigger, registry).
github_repository_url / github_repository_owner / github_repository_nameCI/CD GitHub details.
artifact_registry_repository / cloudbuild_trigger_name / cloudbuild_trigger_idRegistry and build trigger.
kubernetes_readyWhether the cluster/workload is ready.
vpc_sc_enabled / vpc_sc_perimeter_name / vpc_sc_dry_run_modeVPC-SC status.
audit_logging_enabled / artifact_registry_cmek_enabledAudit logging and CMEK status.

6. Configuration Pitfalls & Sensible Defaults​

Risk: Critical (data loss / outage / security) — High (service degraded) — Medium (cost or partial degradation) — Low (minor).

Inherited plan-time validation. This module passes its configuration through the App_GKE foundation engine, which validates values and combinations at plan time — a StatefulSet conflict, IAP with no authorized identities, non-binary quota_memory_* units, an out-of-range redis_port/backup_retention_days, enable_cloudsql_volume = false on a DB-backed app. Invalid configuration fails the plan with a clear, named error before any resource is created, so most mistakes below are caught up front rather than at apply or runtime.

SettingSensible valueRiskConsequence if wrong
AUTHENTICATION_API_KEY (auto-generated)Never rotate after first bootCriticalRotating it makes every already-provisioned WhatsApp instance unreachable and returns 401 to all clients holding the old key.
application_database_name / application_database_userSet onceCriticalImmutable after first deploy; renaming recreates the DB/user and destroys all message history.
max_instance_count1CriticalScaling out fragments in-memory WhatsApp socket sessions across pods, breaking live connections and duplicating webhook deliveries.
enable_backup_importfalse unless restoringCriticalEnabling without a valid backup_uri fails the import job.
quota_memory_requests / _limitsbinary units (4Gi, 8192Mi)CriticalBare integers are bytes and block all pod scheduling in the namespace.
enable_cloudsql_volumetrueHighThe Auth Proxy sidecar is required for PostgreSQL connectivity; disabling it breaks the DB connection.
enable_redistrueHighDisabling drops Evolution API's instance/message cache; the app is configured to expect it (CACHE_REDIS_ENABLED = true).
redis_host"" (NFS) or explicitHighWhen Redis is on but NFS is off and no host is set, the cache URI is blank and caching is silently disabled.
session_affinityClientIPHighWithout stickiness, requests can route away from the single pod holding the WhatsApp socket, breaking instance operations.
service_typeLoadBalancerHighClusterIP makes the manager UI and webhook endpoints unreachable from outside the cluster.
min_instance_count1HighGKE requires min ≥ 1; the validation guard rejects invalid values. Keeping 1 preserves the warm WhatsApp sockets.
enable_iaponly when webhooks not neededHighIAP blocks all unauthenticated requests, including external webhook callbacks.
application_versionPin (e.g. v2.1.1)Mediumlatest maps to a pinned tag, but pinning explicitly avoids surprise upgrades that run new Prisma migrations.

For the foundation behaviour referenced throughout — IAM and Workload Identity, autoscaling, ingress and certificates, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC-SC, backups, and image mirroring — see App_GKE. Evolution-API-specific application configuration shared with the Cloud Run variant is described in EvolutionAPI_Common.

Need RAD to do something it does not do yet? Request it on the roadmap, or vote on what is already there.