Catalog
google/gke-batch-hpc

google

gke-batch-hpc

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).

New~1.4kUpdated Jun 28, 2026

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

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

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).

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:

# Install Kueue
kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/latest/download/manifests.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:

# 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:

# Install MPI Operator
kubectl apply -f https://raw.githubusercontent.com/kubeflow/mpi-operator/master/deploy/v2beta1/mpi-operator.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.
Files1
1 files · 11.1 KB

Select a file to preview

Overall Score

82/100

Grade

B

Good

Safety

85

Quality

82

Clarity

85

Completeness

76

Summary

This skill provides reference documentation for running batch processing and HPC workloads on Google Kubernetes Engine (GKE). It covers Kubernetes Jobs, JobSet, Kueue job queuing, MPI workloads, and cost optimization patterns including Spot VMs and scale-to-zero autoscaling. The skill is instructional and prescriptive rather than prescriptive — it guides users through configuration choices without direct execution.

Detected Capabilities

kubernetes-manifest-applicationkubectl-commandsgcloud-cli-executionkubernetes-resource-inspectionconfiguration-reference

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

gke batch jobshpc on kubernetesjob queuing kueuempi operator setupkubernetes workload scalingspot vms batchhpc cluster tuning

Risk Signals

INFO

External manifest download (Kueue)

Kueue (Job Queuing) section
INFO

GitHub-hosted manifest reference (MPI Operator)

MPI Workloads section
INFO

Template-based placeholders (<IMAGE>, <CLUSTER_NAME>, <REGION>)

Throughout YAML examples

Referenced Domains

External domains referenced in skill content, detected by static analysis.

github.comraw.githubusercontent.comwww.apache.org

Use Cases

  • Execute data processing pipelines on GKE using batch Jobs and JobSet
  • Deploy HPC simulations (CFD, molecular dynamics, financial modeling) with MPI and compact placement
  • Configure multi-tenant job queueing and fair resource sharing with Kueue
  • Optimize batch workload costs using Spot VMs and autoscaling to zero
  • Orchestrate distributed ML training runs with checkpoint resilience on Spot/TPU infrastructure

Quality Notes

  • Skill content aligns with agentskills.io specification (frontmatter with name, description, metadata); clear section hierarchy with use cases, batch processing, HPC, and cost optimization
  • Well-scoped: explicitly contrasts with gke-app-onboarding for web deployments; clearly identifies target workloads (batch, HPC, ML training, CI/CD)
  • MCP tools clearly documented: apply_k8s_manifest, get_k8s_resource, describe_k8s_resource, get_k8s_logs, delete_k8s_resource, list_k8s_events
  • Production guidelines include resource quotas, TPU/Spot cluster maintenance, resilience with backoffLimit and checkpointing, Kueue+JobSet best practices
  • External references (Kueue manifests, MPI Operator YAML) are from official, trusted sources (kubernetes-sigs, kubeflow); manifest downloads are presented as part of setup workflow, not executed dynamically
  • YAML examples include resource requests/limits, parallelism, and replicas — appropriate constraints for batch/HPC
  • Limitations could be more explicit: scope is GKE-specific (not EKS, AKS, on-prem), no guidance on troubleshooting or monitoring dashboards, no error handling examples
Model: claude-haiku-4-5-20251001Analyzed: Jun 28, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v1.1

    Content updated

    ✦ AINo behavioral changes detected.

    2026-06-28

    Latest
  2. v1.0

    2026-06-24

    View This VersionInitial version

Use google/gke-batch-hpc in your dev environment

Command Palette

Search for a command to run...