The Simplest Way to Make Argo Workflows and Google Compute Engine Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

You pair argo workflows and google compute engine to run batch jobs across virtual machines. One tool plans the steps, while the other gives you raw compute power. Teams use this setup to train models, process video, and run heavy tests. Kubernetes holds the main control plane, and virtual machines handle the heavy work. This split keeps your cluster stable during large data bursts. How argo workflows and google compute engine share roles and data The workflow engine runs inside Kubernetes a

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.

You pair argo workflows and google compute engine to run batch jobs across virtual machines. One tool plans the steps, while the other gives you raw compute power.

Teams use this setup to train models, process video, and run heavy tests. Kubernetes holds the main control plane, and virtual machines handle the heavy work. This split keeps your cluster stable during large data bursts.

How argo workflows and google compute engine share roles and data

The workflow engine runs inside Kubernetes and starts each task as a pod. When a job needs a virtual machine, the pod calls the cloud API. This call asks the cloud to build, start, or stop an instance.

To make this call, the pod needs a cloud identity. You link the Kubernetes service account to a cloud service account. Workload identity lets the pod log in without a static key file.

Once the pod logs in, cloud role rules check what it can do. The role must allow the pod to manage instances in one project. Data then moves between the pod and the machine over a private network. Many teams also pass large files through cloud object buckets.

When the machine finishes its task, it writes the output to the bucket. The workflow pod reads the status and moves to the next step. Then the pod tells the cloud to delete the virtual machine.

Common failure modes and how to scope access

Many teams fail by using one broad service account for every workflow. If a single job gets a project editor role, any pod can delete databases. Shared static keys are even worse because devs copy them into git repos.

Another common bug is a zombie machine that runs forever. If a workflow pod crashes, it might skip the cleanup step. You end up paying for idle machines that no one tracks. Unlogged commands also hurt teams during security audits.

Access Request Workflows + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

When a pod runs scripts on a machine via SSH, logs often stay local. If the machine dies, you lose the record of what ran. If a script pulls test data, masking rewrites matched fields in results like emails or card numbers.

To fix permissions, give each workflow template its own Kubernetes service account. Map each one to a narrow cloud role that only controls specific machines. Use instance tags so a job can only stop machines it created.

Lock down the network path between the cluster and the virtual machines. Put both systems in the same private network and block public IPs. Set firewall rules so only workflow pods can reach the machine ports.

Keeping machine lifecycles clean and predictable

Always use exit handlers in your workflow steps to stop machines. An exit handler runs even when the main task fails or times out. This step ensures that every virtual machine shuts down on time.

You should also set max run times on both the workflow and the machine. Cloud settings allow you to set a time limit on any new instance. If the workflow engine loses track, the cloud still kills the machine.

Send all machine logs to a central log sink right away. Do not wait for the job to finish before you ship logs out. Streaming logs help your team fix broken runs in minutes.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

How should workflow pods log in to Google Cloud?

Use workload identity to map Kubernetes accounts directly to cloud accounts. This method avoids JSON key files that can leak or expire during a run.

How do we stop virtual machines from running after a failed job?

Add an exit handler step to your workflow that deletes the instance. Also set a max run timer on the virtual machine at creation time.

Can we restrict which virtual machines a single workflow can touch?

Yes, you can scope cloud roles with resource tags and naming rules. Give each workflow a unique role that only matches its own machine tags.

The query runs. The emails stay hidden.