Command Palette

Search for a command to run...

Назад к скиллам
скилл № 42693

k8s-agent-sandbox

Install and operate the kubernetes-sigs/agent-sandbox controller and CRDs for per-session, isolated AI agent pods on Kubernetes. Use when authoring…

БесплатноБез исполняемых скриптов
vinnie357от vinnie357★ 30 звёзд на GitHub

Установить k8s-agent-sandbox в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

k8s-agent-sandbox

The upstream open-source project kubernetes-sigs/agent-sandbox ships four CRDs that model "give me a per-session, isolated pod for an AI agent and reap it when the session ends." This skill covers the controller, the CRD model, and the lifecycle. Pair with kata-on-kind / kata-on-gke / kina-microvm for the RuntimeClass install and with claude-code-on-sandbox for the workload-side packaging.

What it is

kubernetes-sigs/agent-sandbox is Apache-2.0 (verified at https://github.com/kubernetes-sigs/agent-sandbox). Latest release v0.4.6 (2026-05-14). API group agents.x-k8s.io (core Sandbox) and extensions.agents.x-k8s.io (templates, claims, warm pools). The upstream README example uses v1alpha1; docs/api.md documents v1beta1. Verify the installed CRD version before authoring manifests:

kubectl api-resources | grep -E 'agents\.x-k8s\.io'

GKE ships a managed variant ("Agent Sandbox") that became GA on 2026-05-20. The managed variant is gVisor-only; the upstream open-source project accepts any runtimeClassName including Kata. This skill targets the upstream because Kata (microVM isolation) is the primary use case here.

Install

Upstream (any conformant cluster: kind, k3s, kops, kubeadm, GKE Standard)

VERSION=v0.4.6
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/${VERSION}/manifest.yaml
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/${VERSION}/extensions.yaml

Two manifests because the project splits the core Sandbox CRD from the higher-level SandboxTemplate / SandboxClaim / SandboxWarmPool extensions. Apply both.

Verify the controller comes up:

kubectl get pods -n agent-sandbox-system
kubectl get crd | grep agents.x-k8s.io

GKE managed (Autopilot)

gcloud beta container clusters create-auto ${CLUSTER_NAME} \
  --location=${LOCATION} \
  --cluster-version=${CLUSTER_VERSION} \
  --enable-agent-sandbox

GKE version 1.35.2-gke.1269000 or later. IAM: roles/serviceusage.serviceUsageAdmin. APIs to enable: Artifact Registry, GKE.

GKE managed (Standard)

# Create cluster, then add a sandbox node pool, then enable the addon.
gcloud container clusters create ${CLUSTER_NAME} --location=${LOCATION} --cluster-version=${CLUSTER_VERSION}
gcloud container node-pools create sandbox-pool \
  --cluster=${CLUSTER_NAME} --location=${LOCATION} \
  --image-type=cos_containerd --sandbox=type=gvisor
gcloud beta container clusters update ${CLUSTER_NAME} --location=${LOCATION} --enable-agent-sandbox

The managed addon installs the same CRDs but pins runtimeClassName: gvisor. For Kata on GKE, use the upstream install instead and follow kata-on-gke.

The four CRDs

See references/crds.md for full field reference. One-paragraph summary of each:

  • Sandbox (agents.x-k8s.io) — the actual workload. A single stateful pod with a stable network identity.
  • SandboxTemplate (extensions.agents.x-k8s.io) — a reusable PodSpec for sandboxes. podTemplate.spec.runtimeClassName picks the isolation tier.
  • SandboxClaim (extensions.agents.x-k8s.io) — a per-session request that references a SandboxTemplate and optionally a SandboxWarmPool. Carries lifecycle.shutdownPolicy: Delete so the sandbox auto-reaps.
  • SandboxWarmPool (extensions.agents.x-k8s.io) — N pre-warmed pods sitting idle so that a SandboxClaim resolves in sub-second instead of normal Pod scheduling time.

Mental model

The plugin's templates assume this flow:

  1. Cluster admin: install the controller once.
  2. Cluster admin: install a SandboxTemplate per agent workload (e.g. one for claude-code-kata, one for python-runtime).
  3. Optional: install a SandboxWarmPool per template if cold-start latency matters.
  4. Caller (operator, CI job, Python SDK) applies a SandboxClaim per session.
  5. Controller binds the claim to a warm pod (or schedules a new one) and exposes a stable endpoint via the Sandbox Router.
  6. When the session ends, kubectl delete on the claim (or shutdownPolicy: Delete with a shutdownTime) tears down the pod.

See references/lifecycle.md for the claim/warm-pool semantics.

Per-session lifecycle (simplest path)

Apply a SandboxClaim from a shell or CI step:

apiVersion: extensions.agents.x-k8s.io/v1alpha1
kind: SandboxClaim
metadata:
  name: session-${SESSION_ID}
spec:
  sandboxTemplateRef:
    name: claude-code-kata
  lifecycle:
    shutdownPolicy: Delete
  env:
    - name: ANTHROPIC_API_KEY
      valueFrom:
        secretKeyRef:
          name: anthropic
          key: api-key

spec.env injects per-claim env vars into the pod — keep ANTHROPIC_API_KEY out of the template so the template stays generic across callers.

For the Python SDK alternative (k8s-agent-sandbox / agentic-sandbox-client), see references/python-sdk.md.

Networking (default-deny + Anthropic egress)

`Sa

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/crds.md
  • references/lifecycle.md
  • references/network-policy.md
  • references/python-sdk.md

FAQ

Что делает скилл k8s-agent-sandbox?

Install and operate the kubernetes-sigs/agent-sandbox controller and CRDs for per-session, isolated AI agent pods on Kubernetes. Use when authoring SandboxTemplate / SandboxClaim manifests, configuring SandboxWarmPool for sub-second provisioning, applying default-deny NetworkPolicy, choosing between Kata Containers and gVisor as the RuntimeClass, or comparing managed GKE Agent Sandbox to the upstream open-source path.

Как установить скилл k8s-agent-sandbox?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл k8s-agent-sandbox запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить k8s-agent-sandbox с