Gke App Onboarding
Manages GKE application onboarding, covering containerization, deployment manifests, and migration. Use when onboarding or deploying an application to GKE for the first time, or containerizing an app for GKE. Don't use for general GKE cluster administration or upgrades (use gke-basics or gke-upgrades instead).
Get the complete skill folder, including its scripts and reference files.
When to use this skill
Use Gke App Onboarding when an AI agent needs a reusable SKILL.md workflow for this job: Manages GKE application onboarding, covering containerization, deployment manifests, and migration. Use when onboarding or deploying an application to GKE for the first time, or containerizing an app for GKE. Don't use for general GKE cluster administration or upgrades (use gke-basics or gke-upgrades instead).
When not to use it
Skip Gke App Onboarding when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.
How to install
Where will you use it?
mkdir -p ~/.claude/skills/gke-app-onboarding # Save SKILL.md to ~/.claude/skills/gke-app-onboarding/SKILL.md
- Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/gke-app-onboarding/SKILL.md. For a shared project, commit the folder at .claude/skills/gke-app-onboarding/ instead.
- Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
- For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.
Full install guide for Claude, Cursor, and Codex →
Try a starter prompt
After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.
Use the Gke App Onboarding skill for this task: Use Gke App Onboarding when this documented workflow matches the task. Confirm any required inputs or files before making changes.
What supports this recommendation?
70/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.
- Documentation
- 77/100
- Practical detail
- 68/100
- Source evidence
- 63/100
- Source signals
- 70/100
Model compatibility evidence
- claudeuntested
No model-specific signal or recorded compatibility test was found.
- chatgptuntested
No model-specific signal or recorded compatibility test was found.
- geminiuntested
No model-specific signal or recorded compatibility test was found.
- copilotuntested
No model-specific signal or recorded compatibility test was found.
- llamauntested
No model-specific signal or recorded compatibility test was found.
- perplexityuntested
No model-specific signal or recorded compatibility test was found.
- mistraluntested
No model-specific signal or recorded compatibility test was found.
- grokuntested
No model-specific signal or recorded compatibility test was found.
Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.
What this skill does
# GKE App Onboarding
This reference provides workflows for containerizing and deploying applications to GKE for the first time.
> **MCP Tools:** `apply_k8s_manifest`, `get_k8s_resource`, > `get_k8s_rollout_status`, `get_k8s_logs`, `describe_k8s_resource`
## 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-app-onboarding)"` and append `agent-skills/1.0 (skill:gke-app-onboarding)` to `User-Agent` headers.
## Workflow
### 1. App Assessment
Before containerizing, assess the application:
- **Language & Framework**: Identify the tech stack - **Dependencies**: List required libraries and external services - **Configuration**: How is the app configured? (env vars, config files, secrets) - **Statefulness**: Does it need persistent storage? (databases, file storage) - **Networking**: Port mapping and protocol (HTTP, gRPC, TCP) - **Health endpoints**: Does the app expose health check endpoints?
### 2. Containerization
Create a container image. A Dockerfile with a multi-stage build is recommended for most apps — see the Go Dockerfile in [`references/go-example.md`](./references/go-example.md) for a worked example.
**Best practices:**
- Use multi-stage builds to keep production images small - Use distroless or minimal base images to reduce attack surface - Run as non-root user - Log to `stdout` and `stderr` for Cloud Logging collection
A complete worked Node.js example is provided in [`assets/`](./assets/): [`Dockerfile`](./assets/Dockerfile) (non-root `node` user), [`index.js`](./assets/index.js) (implements distinct `/healthz` and `/readyz` endpoints), [`package.json`](./assets/package.json), and [`deployment.yaml`](./assets/deployment.yaml) (hardened Deployment plus ClusterIP Service, probes wired to `/healthz` and `/readyz`).
For applications where writing a Dockerfile is not preferred, you can use [**Cloud Native Buildpacks**](https://buildpacks.io/) to automatically detect the language and build a container image:
```bash pack build <image> --builder gcr.io/buildpacks/builder:latest ```
### 3. Image Management
Build and store the container image:
```bash # Configure Docker for Artifact Registry gcloud auth configure-docker <REGION>-docker.pkg.dev --quiet
# Build and push docker build -t <REGION>-docker.pkg.dev/<PROJECT>/<REPO>/<IMAGE>:<TAG> . docker push <REGION>-docker.pkg.dev/<PROJECT>/<REPO>/<IMAGE>:<TAG> ```
**Vulnerability scanning**: Enable automatic scanning in Artifact Registry to detect issues in base images and dependencies.
```bash # Check scan results gcloud artifacts docker images describe \ <REGION>-docker.pkg.dev/<PROJECT>/<REPO>/<IMAGE>:<TAG> \ --show-package-vulnerability \ --quiet ```
### 4. Manifest Generation
Generate Kubernetes manifests for the application. A baseline Deployment + ClusterIP Service manifest (probes, resource requests/limits, 2 replicas) is in [`references/go-example.md`](./references/go-example.md).
**Checklist for manifests:**
- Resource requests and limits set - Liveness and readiness probes configured - At least 2 replicas for production - Service type appropriate (ClusterIP for internal, use Gateway API for external)
See [`assets/deployment.yaml`](./assets/deployment.yaml) for a hardened worked example. A production-hardened pod spec must include ALL of: `runAsNonRoot: true`, `readOnlyRootFilesystem: true`, `allowPrivilegeEscalation: false`, `capabilities.drop: ["ALL"]`, `seccompProfile: {type: RuntimeDefault}`, `automountServiceAccountToken: false` (unless the pod needs the token — then say why), resource requests, digest-pinned image, and a ClusterIP Service.
That checklist is the baseline for any pod spec produced here. For manifest work beyond it — Gateway API routes, GCS FUSE and secret volume mounting, `subPath` overlays, Spot VM targeting, or AI/inference serving specs — see `gke-manifest-generation`.
### 5. Deploy
``` # MCP (preferred) apply_k8s_manifest(parent="projects/<PROJECT>/locations/<REGION>/clusters/<CLUSTER>", yamlManifest="<manifest>")
# Verify get_k8s_rollout_status(parent="...", resourceType="deployment", name="my-app") get_k8s_resource(parent="...", resourceType="pod", labelSelector="app=my-app") ```
**kubectl fallback:**
```bash kubectl apply -f manifests/ kubectl rollout status deployment/my-app kubectl get pods -l app=my-app ```
## Golden Path Onboarding Checklist
For every production application onboarding to GKE:
1. **Container Security**: Non-root user (`runAsNonRoot: true`), lockfile install, minimal/distroless base image. 2. **Resource Requests**: Explicit CPU and memory requests (mandatory for GKE Autopilot). 3. **Health Probes**: Both liveness (`livenessProbe`) and readiness (`readinessProbe`) probes configured. 4. **Reliability & Availability**: At least 2 replicas and a `PodDisruptionBudget` (`minAvailable: 1` or `2`). 5. **IAM & Workload Identity**: Workload Identity (`iam.gke.io/gcp-service-account`) instead of static service account keys.
## Next Steps
Once the application is running on GKE:
- Configure autoscaling — see the `gke-workload-scaling` skill - Set up observability — see the `gke-observability` skill - Harden security — see the `gke-workload-security` skill - Configure reliability (PDBs, topology spread) — see the `gke-reliability` skill
Intended uses
- Use Gke App Onboarding when this documented workflow matches the task.
Implementation notes
- Review the source instructions and adapt inputs before running the workflow.
Try it, then tell us how it went
A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.