The Simplest Way to Make Cloud Run and Talos Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use cloud run and talos to run web apps alongside strict Kubernetes clusters. Cloud Run handles public web traffic while Talos Linux runs core backend workloads. This split lets your team scale stateless web containers on demand. At the same time, you keep strict control over your stateful cluster nodes. Putting these two tools together gives you speed and safety in one setup. How auth and data flow between cloud run and talos Each Cloud Run service runs with its own cloud service acco

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use cloud run and talos to run web apps alongside strict Kubernetes clusters. Cloud Run handles public web traffic while Talos Linux runs core backend workloads.

This split lets your team scale stateless web containers on demand. At the same time, you keep strict control over your stateful cluster nodes. Putting these two tools together gives you speed and safety in one setup.

How auth and data flow between cloud run and talos

Each Cloud Run service runs with its own cloud service account identity. Talos Linux manages cluster nodes and uses mutual TLS for all control calls. It removes host shells and SSH to keep every node locked down.

When a web app needs cluster data, it sends a request over a private network. A Virtual Private Cloud connector routes traffic from the serverless app to the cluster. The cluster checks the caller identity before it lets any traffic in.

You can map cloud service accounts to specific Kubernetes role rules. The serverless app requests a short token from the cloud metadata server. It sends this token to the cluster API or an internal service endpoint.

The cluster checks the token against its trusted identity provider list. If the check passes, the request moves to the right backend pod. Data then flows back over the same private network path to the caller.

Common failure modes and how to scope roles

Many teams make mistakes when they link these two platforms for the first time. A common error is sharing one default service account across many web apps. If one app gets breached, the attacker gains broad cluster permissions right away.

Another bad habit is storing static cluster keys inside serverless app variables. Static keys for Talos or Kubernetes do not expire on their own. Anyone who reads the app settings can copy those keys and use them anywhere.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged requests also create huge blind spots during security reviews. When ten apps use one shared identity, logs cannot show which app made a change. Your team cannot trace bad writes or slow reads back to the source.

To fix this, create one unique service account for every single serverless service. Bind each account to a tight Kubernetes role that only grants needed actions. If an app only reads pod data, do not give it write rules.

Next, lock down the network path between the two environments. Put your Talos nodes on private subnets with no public IP addresses. Use firewall rules so only your serverless connector subnet can reach the cluster ports.

Managing node updates and PII data safety

Day two work gets much easier when you separate web apps from nodes. You can update Talos node images through its API without touching web apps. Meanwhile, developers push new container builds to Cloud Run several times a day.

Keep your audit logs in one central place for both systems. Send serverless request logs and cluster API logs to the same log sink. Match the request IDs so your team can trace a call end to end.

When apps query backend data, make sure you protect sensitive user fields. Data masking rewrites matched fields in results, such as emails and phone numbers. You should also mask card numbers and national IDs before returning data to callers.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Can Cloud Run talk to a private Talos cluster without public IPs?

Yes, you can link both tools over a private cloud network. Attach a VPC access connector to your serverless app and route traffic to private node IPs.

How do we replace static kubeconfig files in serverless apps?

Use workload identity federation to swap cloud tokens for cluster access. Your app uses its runtime identity to log in without storing static keys.

Why did my serverless app lose connection after a Talos upgrade?

Check if the upgrade changed node IP addresses or rotated cluster TLS certs. Point your serverless apps at a stable internal load balancer instead of single node IPs.

The query runs. The emails stay hidden.