Skip to content

FEAT: Add GkeCodeExecutor for Secure Code Execution on GKE #2170

Closed

Description

@syangx39

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Is your feature request related to a problem? Please describe.
The Agent Development Kit (ADK) provides frameworks for building agents that can generate and run code. However, for customers running ADK agents on Google Kubernetes Engine (GKE), there isn't a native, secure, and customizable server-side execution environment.
In code_executors module

  • The BuiltInCodeExecutor offloads execution to a Google backend and is restricted to Gemini models, which isn't ideal for users who need to execute code within their own GKE cluster.
  • The ContainerCodeExecutor is incompatible with GKE. It tries to connect directly to a Docker daemon, but a pod in GKE does not have access to the underlying node's container daemon, causing the executor to fail.

Describe the solution you'd like
We propose a new code executor, GkeCodeExecutor, designed specifically for secure code execution on GKE.

This executor leverages the GKE Sandbox environment (gVisor) to provide strong workload isolation. For each code execution request, it dynamically creates an ephemeral Kubernetes Job with a hardened Pod configuration.

Key features list.

Describe alternatives you've considered
We analyzed the existing ADK code_executors. All of them are not suitable to run on GKE.

Additional context
This feature will provide GKE customers with a first-class, secure-by-default mechanism for running LLM-generated code. The implementation relies on a ServiceAccount having the correct RBAC permissions to create/watch Jobs, create/delete ConfigMaps, and read pod logs. A reference implementation for the required Role and RoleBinding would be provided to guide users.

This new executor would be registered within the ADK framework, with ImportError handling to ensure the kubernetes SDK is only required if the executor is used.

Activity

  1. added
    core[Component] This issue is related to the core interface and implementation
    on Jul 25, 2025
  2. added theissue type on Jul 25, 2025
  3. syangx39 commented on Jul 25, 2025

    @syangx39
    Author

    #1629 is targeting to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

core[Component] This issue is related to the core interface and implementation

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions