gcp-gke
Provision and operate production-ready Google Kubernetes Engine (GKE) clusters using Autopilot as the golden path. Covers Autopilot vs Standard, private clusters, Workload Identity, autoscaling, GPU/TPU node pools for AI inference, cost optimization with Spot VMs, and observability via Managed Prometheus.
What this skill does
# GCP Google Kubernetes Engine (GKE) ## Overview GKE is Google Cloud's managed Kubernetes platform. It runs the control plane for you, automates upgrades, and ships two operating modes: **Autopilot** (Google manages nodes; pay per pod) and **Standard** (you manage node pools; pay per node). Default to Autopilot — it eliminates node-level toil and is the recommended golden path for production. ## Instructions ### Autopilot vs Standard | | Autopilot | Standard | |---|---|---| | Node management | Google | You | | Billing model | Per-pod resources | Per-node VM | | Node pool config | None | You configure | | Best for | Most workloads | DaemonSets, GPUs with custom drivers, privileged pods | | Workload Identity | Required | Recommended | Use Standard only when you genuinely need node-level access (custom kernel, certain GPU configs, privileged DaemonSets). Otherwise, Autopilot. ### Quick Start (Autopilot) ```bash gcloud services enable container.googleapis.com gcloud container clusters create-auto prod-cluster \ --region=us-central1 \ --release-channel=regular \ --enable-private-nodes \ --network=default --subnetwork=default gcloud container clusters get-credentials prod-cluster --region=us-central1 kubectl create deployment hello \ --image=us-docker.pkg.dev/google-samples/containers/gke/hello-app:1.0 kubectl expose deployment hello --port=80 --target-port=8080 --type=LoadBalancer ``` ### Production Cluster Defaults ```bash gcloud container clusters create-auto prod-cluster \ --region=us-central1 \ --release-channel=regular \ --enable-private-nodes \ --enable-master-authorized-networks \ --master-authorized-networks=10.0.0.0/8,YOUR_OFFICE_CIDR \ --network=prod-vpc --subnetwork=prod-subnet \ --cluster-secondary-range-name=pods \ --services-secondary-range-name=services \ --workload-pool=my-project.svc.id.goog \ --enable-shielded-nodes ``` ### Workload Identity (Pods → GCP APIs without keys) ```bash # Create a Google Service Account for the workload gcloud iam service-accounts create orders-api gcloud projects add-iam-policy-binding my-project \ --member="serviceAccount:[email protected]" \ --role="roles/cloudsql.client" # Bind the Kubernetes ServiceAccount to the GSA gcloud iam service-accounts add-iam-policy-binding \ [email protected] \ --role="roles/iam.workloadIdentityUser" \ --member="serviceAccount:my-project.svc.id.goog[default/orders-api]" ``` ```yaml apiVersion: v1 kind: ServiceAccount metadata: name: orders-api namespace: default annotations: iam.gke.io/gcp-service-account: [email protected] --- apiVersion: apps/v1 kind: Deployment metadata: name: orders-api spec: replicas: 3 selector: matchLabels: { app: orders-api } template: metadata: labels: { app: orders-api } spec: serviceAccountName: orders-api # → maps to GSA via Workload Identity containers: - name: api image: us-central1-docker.pkg.dev/my-project/repo/orders-api:v1.4.2 resources: requests: cpu: "500m" memory: "512Mi" limits: cpu: "1" memory: "1Gi" ``` ### Autoscaling ```yaml apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: orders-api spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: orders-api minReplicas: 3 maxReplicas: 50 metrics: - type: Resource resource: name: cpu target: { type: Utilization, averageUtilization: 70 } - type: Resource resource: name: memory target: { type: Utilization, averageUtilization: 80 } ``` ```yaml # PodDisruptionBudget — keep service available during voluntary disruptions apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: orders-api spec: minAvailable: 2 selector: matchLabels: { app: orders-api } ``` ### Gateway API (Modern Ingress) ```yaml apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: external-gateway spec: gatewayClassName: gke-l7-global-external-managed listeners: - name: https protocol: HTTPS port: 443 tls: mode: Terminate certificateRefs: - name: api-cert --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: orders-route spec: parentRefs: [{ name: external-gateway }] hostnames: ["api.example.com"] rules: - matches: [{ path: { type: PathPrefix, value: "/orders" } }] backendRefs: - name: orders-api port: 80 ``` ### GPU Inference Workload (Standard Mode) ```bash # Create a node pool with L4 GPUs and Spot VMs for cheap inference gcloud container node-pools create inference-l4 \ --cluster=ml-cluster --region=us-central1 \ --machine-type=g2-standard-8 \ --accelerator=type=nvidia-l4,count=1,gpu-driver-version=LATEST \ --num-nodes=0 --enable-autoscaling --min-nodes=0 --max-nodes=10 \ --spot --node-taints=workload=inference:NoSchedule ``` ```yaml apiVersion: apps/v1 kind: Deployment metadata: { name: vllm-llama } spec: replicas: 1 selector: { matchLabels: { app: vllm } } template: metadata: { labels: { app: vllm } } spec: tolerations: - key: workload operator: Equal value: inference effect: NoSchedule nodeSelector: cloud.google.com/gke-accelerator: nvidia-l4 containers: - name: vllm image: vllm/vllm-openai:latest args: ["--model", "meta-llama/Llama-3-8B-Instruct", "--port", "8000"] resources: limits: nvidia.com/gpu: 1 memory: "24Gi" cpu: "4" ``` ### Cost Optimization ```bash # Spot VMs for fault-tolerant batch gcloud container node-pools create batch-spot \ --cluster=prod-cluster --region=us-central1 \ --machine-type=e2-standard-4 \ --spot --num-nodes=0 --enable-autoscaling --max-nodes=20 # Compute Class definition (newer alternative to node pools) ``` ```yaml apiVersion: cloud.google.com/v1 kind: ComputeClass metadata: { name: spot-burst } spec: priorities: - machineFamily: n4 spot: true - machineFamily: n2 spot: true - machineFamily: n2 # on-demand fallback nodePoolAutoCreation: { enabled: true } ``` ### Observability — Managed Prometheus ```yaml # Scrape app metrics with Google Cloud Managed Service for Prometheus apiVersion: monitoring.googleapis.com/v1 kind: PodMonitoring metadata: { name: orders-api } spec: selector: matchLabels: { app: orders-api } endpoints: - port: metrics interval: 30s ``` ## Examples ### Example 1 — Stand up a production Autopilot cluster User wants a hardened GKE cluster for a new service. Create an Autopilot cluster on the regular release channel with private nodes, master authorized networks, Workload Identity enabled, and Shielded Nodes. Wire the app's Kubernetes ServiceAccount to a GSA with the minimum IAM roles, deploy via a Deployment + HPA + PDB, and front it with the Gateway API for managed TLS. ### Example 2 — Run a vLLM Llama 3 inference service on Spot L4s User needs cheap LLM inference. Create a Standard cluster (Autopilot doesn't support custom GPU drivers consistently), add an L4 node pool with `--spot` and autoscaling 0→10, deploy vLLM with a node selector + toleration so only inference pods schedule there, and add Managed Prometheus scraping for token-throughput metrics. ## Guidelines - **Default to Autopilot** — most workloads should never see a node pool config - Use the **regular release channel** in production; rapid for staging; stable only for highly conservative orgs - Always **enable private nodes + master authorized networks**; never expose the API server publicly - **Workload Identity is mandatory** — never put service account JSON keys in Secrets - Set resource `requests` AND `limits`; Autopilo
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.