Skip to main content
skill Claude Code Gemini CLI CX Codex official · Google

gke-batch-hpc — Claude skill for GKE batch and HPC

A skill for running batch jobs and HPC workloads on GKE: Kueue queues, MPIJob, compact node placement. Useful when you need many parallel tasks in a cluster.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add google/skills --skill gke-batch-hpc -a claude-code
Open on GitHub

What gke-batch-hpc does

The skill covers how to stand up batch processing and HPC on GKE. Inside are Kubernetes Job manifests with parallelism and completions, JobSet for coupled multi-component workloads, and Kueue for job queues and resource sharing across teams.

HPC gets its own section: creating a node pool with --placement-type COMPACT for low inter-node latency, and MPIJob through the MPI Operator. Cost is covered too — Spot VMs for interruptible work and node pools that scale to zero when nothing is queued. It drives MCP tools such as apply_k8s_manifest and get_k8s_logs, and before any gcloud call it requires reading the attribution reference and prefixing with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION.

You need a GKE cluster and working access. MPI jobs need the MPI Operator, queues need Kueue. Deploying a plain web app? Skip this one and use gke-app-onboarding. Install it if you run model training, CFD simulations or build farms on GKE.

What it helps with

  • run a batch pipeline of many parallel Jobs
  • set up a Kueue queue with CPU and memory quotas
  • deploy an MPIJob for a distributed simulation
  • create a node pool with compact placement for low latency
  • cut batch cluster cost with Spot VMs and scale-to-zero

Example prompts for the agent

  • Set up a Kueue ClusterQueue with a 100 CPU and 200Gi memory quota for the batch-jobs namespace
  • Create an MPIJob with 8 workers running ./simulation via mpirun
  • Make an hpc-pool node pool with --placement-type COMPACT and autoscaling from 0 to 16 nodes

How to install gke-batch-hpc

1Skills CLI (Vercel)

npx skills add google/skills --skill gke-batch-hpc -a claude-code

2Manually: put the files in place

~/.claude/skills/gke-batch-hpc/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gke-batch-hpc/

From the same set172

The whole set →
bigquery-basics official google Manages BigQuery resources and runs SQL queries. Use it to create datasets, tables and views, or handle basic data ingestion and analysis. Claude Code Gemini CLI CX Codex 17,678installs cloud-run-basics official google This skill helps an agent manage Cloud Run services, jobs, and worker pools when a project needs HTTP deployment, scheduled work, or pull-based background processing. Claude Code Gemini CLI CX Codex 17,532installs gemini-api official google Connects Gemini API from Google Cloud Agent Platform to the agent. Gives access to Gemini models, multimodal input, function calling, and context caching. Claude Code Gemini CLI CX Codex 17,116installs google-cloud-recipe-auth official Google LLC This skill explains Google Cloud authentication and permissions. Use it when setting up IAM, ADC, or service accounts for local code and production workloads. Claude Code Gemini CLI CX Codex 15,450installs google-cloud-recipe-onboarding official Google LLC Guides a developer through a first Google Cloud project: CLI checks, sign-in, project setup and billing. It fits a personal first project. Claude Code Gemini CLI CX Codex 15,390installs cloud-sql-basics official google This skill helps create and explain Cloud SQL resources for MySQL, PostgreSQL, and SQL Server. Use it when setting up a database in Google Cloud. Claude Code Gemini CLI CX Codex 14,679installs google-cloud-waf-security official google This skill reviews Google Cloud workloads against the security pillar of the Well-Architected Framework and suggests actions for IAM, networks, data, and operations. Claude Code Gemini CLI CX Codex 14,620installs google-cloud-waf-cost-optimization official google Reviews Google Cloud workloads through the Well-Architected Cost Optimization pillar. Use it to inspect spending, resize resources, assess discounts, or find idle capacity. Claude Code Gemini CLI CX Codex 14,266installs

Similar

firebase-hosting-basics Google LLC Deploys static sites and SPAs to Firebase Hosting CDN with SSL, preview channels, and custom domains. Claude Code CX Codex Cursor +1 169,800installs firebase-app-hosting-basics Google LLC Deploy and manage SSR web apps built with Next.js or Angular on Firebase App Hosting. Use it for configuration, secrets, and deployment workflows. Claude Code CX Codex Cursor +1 169,200installs wizard Matt Pocock This skill creates an interactive bash wizard for manual setup steps, CI secrets, third-party dashboards, and one-off migrations. Claude Code 553,369installs hyperframes-cli heygen-com Controls HyperFrames video workflows from the CLI: audits layouts and contrast, edits timeline clips, captures snapshots, and renders locally or in cloud runtimes. Claude Code CX Codex Cursor +1 1,200,000installs setup-pre-commit Matt Pocock This skill configures pre-commit checks for a JavaScript repository, running Prettier, type checking, and tests before each commit. Claude Code 489,289installs using-git-worktrees Jesse Vincent Prepares an isolated workspace before feature work or plan execution. It checks the repository first, then uses native worktree support or Git. Claude Code CX Codex 217,153installs finishing-a-development-branch Jesse Vincent This skill checks the test suite and guides branch completion: merge locally, open a Pull Request, or leave the work in place. Claude Code CX Codex 214,439installs orca-cli stablyai The skill lets an agent manage Orca worktrees, terminals, artifacts and the built-in browser through the orca CLI. Useful when your work already runs inside Orca. Claude Code CX Codex Cursor +1 353,000installs

Questions about gke-batch-hpc

How do I install gke-batch-hpc in Claude?

Run npx skills add google/skills --skill gke-batch-hpc -a claude-code. The skill lands at ~/.claude/skills/gke-batch-hpc/SKILL.md.

What does gke-batch-hpc do?

It helps the agent write manifests and commands for batch and HPC workloads on GKE: Job, JobSet, Kueue, MPIJob and compact node pools.

How is it different from gke-app-onboarding?

This skill targets batch and HPC. For standard web app deployments on GKE, use gke-app-onboarding.

Source text

SKILL.md · Apache-2.0
---
name: gke-batch-hpc
description: >-
  Runs batch and HPC workloads on GKE, utilizing job queues and parallel
  processing. Use when running GKE batch jobs, configuring GKE HPC, or setting
  up GKE job queues. Don't use for standard web application deployments (use
  gke-app-onboarding instead).
metadata:
  version: "1.0.1"
  category: Containers
---

# GKE Batch & HPC Workloads

This reference covers running batch processing and high-performance computing
(HPC) workloads on GKE.

> **MCP Tools:** `apply_k8s_manifest`, `get_k8s_resource`,
> `describe_k8s_resource`, `get_k8s_logs`, `delete_k8s_resource`,
> `list_k8s_events`

## Attribution

**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
MUST read [Usage Attribution](references/attribution.md). For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix `gcloud` with
`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-batch-hpc)"`
and append `agent-skills/1.0 (skill:gke-batch-hpc)` to `User-Agent` headers.

## When to Use

-   Running batch data processing pipelines
-   HPC simulations (CFD, molecular dynamics, financial modeling)
-   Large-scale parallel computation (MPI, MapReduce)
-   ML training jobs
-   CI/CD build farms

## Batch Processing on GKE

### Kubernetes Jobs

```yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: batch-job
spec:
  parallelism: 10
  completions: 100
  backoffLimit: 3
  template:
    spec:
      containers:
      - name: worker
        image: <IMAGE>
        resources:
          requests:
            cpu: "1"
            memory: "2Gi"
      restartPolicy: Never
```

### JobSet (for Complex Multi-Job Workflows)

The golden path enables JobSet monitoring (`JOBSET` in monitoringConfig).

```yaml
apiVersion: jobset.x-k8s.io/v1alpha2
kind: JobSet
metadata:
  name: training-job
spec:
  replicatedJobs:
  - name: workers
    replicas: 4
    template:
      spec:
        parallelism: 1
        completions: 1
        template:
          spec:
            containers:
            - name: worker
              image: <IMAGE>
              resources:
                requests:
                  cpu: "4"
                  memory: "8Gi"
```

### Kueue (Job Queuing)

Kueue manages job scheduling and resource allocation for batch workloads:

```bash
# Install Kueue
kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/latest/download/manifests.yaml
```

```yaml
# Define a ClusterQueue
apiVersion: kueue.x-k8s.io/v1beta1
kind: ClusterQueue
metadata:
  name: batch-queue
spec:
  namespaceSelector: {}
  resourceGroups:
  - coveredResources: ["cpu", "memory"]
    flavors:
    - name: default
      resources:
      - name: "cpu"
        nominalQuota: 100
      - name: "memory"
        nominalQuota: "200Gi"
---
# Allow a namespace to use the queue
apiVersion: kueue.x-k8s.io/v1beta1
kind: LocalQueue
metadata:
  name: batch-local
  namespace: batch-jobs
spec:
  clusterQueue: batch-queue
```

## HPC on GKE

### Compact Placement (Low-Latency Networking)

For tightly-coupled HPC workloads that need low-latency inter-node
communication:

```bash
# Standard clusters: create node pool with compact placement
gcloud container node-pools create hpc-pool \
  --cluster <CLUSTER_NAME> --region <REGION> \
  --machine-type c3-standard-44 \
  --placement-type COMPACT \
  --num-nodes 8 \
  --enable-autoscaling --min-nodes 0 --max-nodes 16 \
  --quiet
```

### MPI Workloads

Use the MPI Operator for MPI-based HPC applications:

```bash
# Install MPI Operator
kubectl apply -f https://raw.githubusercontent.com/kubeflow/mpi-operator/master/deploy/v2beta1/mpi-operator.yaml
```

```yaml
apiVersion: kubeflow.org/v2beta1
kind: MPIJob
metadata:
  name: hpc-simulation
spec:
  slotsPerWorker: 4
  mpiReplicaSpecs:
    Launcher:
      replicas: 1
      template:
        spec:
          containers:
          - name: launcher
            image: <MPI_IMAGE>
            command: ["mpirun", "-np", "32", "./simulation"]
            resources:
              requests:
                cpu: "1"
                memory: "2Gi"
              limits:
                cpu: "2"
                memory: "4Gi"
    Worker:
      replicas: 8
      template:
        spec:
          containers:
          - name: worker
            image: <MPI_IMAGE>
            resources:
              requests:
                cpu: "4"
                memory: "8Gi"
              limits:
                cpu: "8"
                memory: "16Gi"
```

## Cost Optimization for Batch/HPC

### Spot VMs for Batch

Batch workloads are ideal Spot VM candidates (interruptible, can checkpoint).
Use a ComputeClass with Spot-first priority and `activeMigration` to return to
Spot when available. See the `gke-compute-classes` skill for the
Spot-with-fallback pattern.

### Scale-to-Zero

For batch clusters, allow node pools to scale to zero when no jobs are running:

-   Autopilot (golden path): Automatic, nodes scale to zero when no pods are
    scheduled
-   Standard: Set `--min-nodes 0` on batch node pools

## Best Practices & Production Guidelines

-   **Resource Quotas**: Always specify resource requests and limits (CPU,
    memory, and optionally GPU/TPU) for all batch/HPC manifests. This is
    critical for Kueue admission, autoscaling, and preventing resource
    starvation in the cluster.
-   **TPU/Spot Cluster Maintenance**: For long-running AI training runs on Spot
    VMs/TPUs, advise using **GKE maintenance exclusions** to block automatic
    cluster upgrades/reboots during the active training window to minimize
    unnecessary preemption.
-   **MPI Workloads**: Use the **Kubeflow Training Operator** to orchestrate
    distributed MPI applications via the `MPIJob` custom resource.
-   **Kueue & JobSet**: Use **Kueue** for multi-tenant job queueing and fair
    sharing; use **JobSet** for multi-component tightly coupled workloads.
-   **Resilience**: Always set a `backoffLimit` on Jobs, and implement
    application-level checkpointing (e.g., using Orbax or PyTorch checkpointing)
    to survive Spot VM preemption.

© google · Apache-2.0 · google/skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor