gke-unprotected-statefulset
Audits, detects, and proposes fixes for GKE StatefulSets that lack a matching PodDisruptionBudget (PDB) to prevent simultaneous Pod evictions during voluntary node drains (GKE insight subtype PDB_UNPROTECTED_STATEFULSET)
Install / Use
npx skills add google/skills --skill gke-unprotected-statefulsetInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of gke-unprotected-statefulset
gke-unprotected-statefulset scores 90/100 on our quality scale, 1193rd of 4,700 Development & Engineering skills we index (top 26%).
Its SKILL.md is 33 KB long, well organised into 17 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
With 20,340 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so gke-unprotected-statefulset is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
gke-unprotected-statefulset compared with similar skills
All 4 of these similar skills score higher than gke-unprotected-statefulset; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| gke-unprotected-statefulset (this skill)by google | 90 | 20.3k | 2mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 121.1k | today | CLAUDE.md |
| hyperframesby heygen-com | 100 | 89.6k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 73.3k | 1d ago | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.6k | 4d ago | CLAUDE.md |
Frequently asked questions
- How do I install gke-unprotected-statefulset?
- Run
npx skills add google/skills --skill gke-unprotected-statefulset. The install tabs above show the steps for each supported agent. - Which AI agents does gke-unprotected-statefulset work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is gke-unprotected-statefulset safe to use?
- It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is gke-unprotected-statefulset still maintained?
- The repository was last updated about 2 months ago, so gke-unprotected-statefulset is actively maintained.
Skill content
View source on GitHubname: gke-unprotected-statefulset metadata: version: "1.0.0" category: Containers description: >- Audits, detects, and proposes fixes for GKE StatefulSets that lack a matching PodDisruptionBudget (PDB) to prevent simultaneous Pod evictions during voluntary node drains (GKE insight subtype PDB_UNPROTECTED_STATEFULSET). Use when investigating the PDB_UNPROTECTED_STATEFULSET insight, checking whether GKE StatefulSets have a matching PDB, or proposing fixes for selector mismatches where an existing PDB does not match the StatefulSet's .spec.selector. Don't use for existing PDBs that allow zero disruptions or block node drains (PDB_UNPERMISSIVE), general probe and PDB setup unrelated to this insight (use gke-reliability), upgrade planning (use gke-upgrades), Pods stuck in Pending (use gke-workload-troubleshooting), node autoscaling or capacity stockouts (use gke-cluster-autoscaler), ComputeClass configuration (use gke-compute-classes), or general Kubernetes manifest generation (use gke-manifest-generation).
GKE unprotected StatefulSet skill
Use this skill to find, verify, and propose fixes for GKE StatefulSet
workloads lacking a matching PodDisruptionBudget (PDB), subtype
PDB_UNPROTECTED_STATEFULSET. Without a matching PDB, voluntary node drains can
take down all Pods at once or drop a stateful app below quorum; a zero-budget
PDB triggers PDB_UNPERMISSIVE, which GKE violates after one hour (see
When GKE identifies workloads with vulnerability to disruption
and "Dealing with disruptions" and "Pod disruption budgets" in
Disruptions).
Read-only rule: Run read-only diagnostic commands only. Never drain, delete, or re-create nodes, create or modify Kubernetes resources, dismiss or change insight or recommendation state, or run any other command that changes the cluster or project. Give the user any fix to apply themselves.
Usage attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, read and
follow Usage Attribution.
Prerequisites
- Google Cloud CLI, APIs, and billing: If
gcloudis missing or uninitialized orcontainer.googleapis.comis disabled, point the user to Before you begin (never enable APIs or install software yourself). Ifrecommender.googleapis.comis disabled, point the user to "gcloud" in Enable the API. The project needs an active Cloud Billing account. kubectland cluster credentials: Ifkubectlor required auth plugins are missing, point the user to "Install kubectl" and "Install required plugins" in Install kubectl and configure cluster access, and use "Store cluster information for kubectl" on that page to configure cluster credentials forkubectl.- IAM roles: Under
Google Kubernetes Engine roles
and
Required roles:
- Kubernetes Engine Viewer (
roles/container.viewer) to configure credentials and read clusters, StatefulSets, PDBs, insights, and recommendations. - Kubernetes Engine Developer (
roles/container.developer) only for the user to create/update PDBs, update/scale StatefulSets, or dismiss recommendations. - Kubernetes Engine Cluster Admin (
roles/container.clusterAdmin) only for the user to configure cluster maintenance windows/exclusions or Standard node-pool maintenance exclusions.
- Kubernetes Engine Viewer (
- Documentation:
- Ensure workloads are disruption-ready (Sections: "Identify workloads with vulnerability to disruption", "When GKE identifies workloads with vulnerability to disruption", "Implement the guidance to improve disruption readiness")
- Optimize your usage of GKE with insights and recommendations (Sections: "Before you begin", "Required roles", "View insights and recommendations", "Dismiss or restore recommendations", "Dismiss recommendations using the Google Cloud CLI")
- Enable the API (Sections: "gcloud")
- Insights (Sections: "Description", "Content", "Target Resources", "State Info", "Severity", "Last Refresh Time")
- Google Kubernetes Engine roles and permissions (Sections: "Google Kubernetes Engine roles")
- Install kubectl and configure cluster access (Sections: "Install kubectl", "Install required plugins", "Store cluster information for kubectl")
- Manage clusters (Sections: "View your clusters")
- Deploying a stateful application (Sections: "Creating a StatefulSet", "Inspecting a StatefulSet", "Updating a StatefulSet", "Scaling a StatefulSet")
- Node upgrade strategies (Sections: "maxSurge: GKE creates a new surge node before removing an existing one", "maxUnavailable: GKE makes an existing node unavailable to recreate it", "Phase 3: Drain blue pool", "Phase 5: Delete blue pool")
- Autopilot cluster upgrades (Sections: "Automatic node upgrades")
- Troubleshoot cluster upgrades (Sections: "Troubleshoot node pool upgrades taking longer than usual")
- Maintenance windows and exclusions (Sections: "Automatic maintenance that doesn't respect GKE maintenance policies", "Maintenance windows", "Maintenance exclusions", "Node pool maintenance exclusions", "Limitations on configuring maintenance exclusions", "Example: Company's legacy database not resilient to node pool upgrades")
- Configure maintenance windows and exclusions (Sections: "Configure a maintenance window", "Configure a maintenance exclusion")
- Environment architecture (Sections: "Environment's cluster")
- Get support (Sections: "Before you contact support", "Recommendations for efficient support")
- Disruptions (Sections: "Voluntary and involuntary disruptions", "Dealing with disruptions", "Pod disruption budgets")
- Specifying a Disruption Budget for your Application (Sections: "Identify an Application to Protect", "Think about how your application reacts to disruptions", "Rounding logic when specifying percentages", "Specifying a PodDisruptionBudget", "Create the PDB object", "Check the status of the PDB", "Healthiness of a Pod", "Unhealthy Pod Eviction Policy", "Arbitrary workloads and arbitrary selectors")
- Configure Liveness, Readiness and Startup Probes (Sections: "Define readiness probes")
This skill creates no billable resources, so no teardown is required.
Diagnostic workflow
Scope and Managed Airflow check:
- Managed Service for Apache Airflow (formerly Cloud Composer): Under Environment's cluster, clusters for Managed Airflow and workloads deployed into them are managed by Google: do not introduce changes in the environment's cluster (doing so might break the environment). When the user says the cluster belongs to a Managed Airflow (or Cloud Composer) environment, do not propose workload or PDB changes; ask when that isn't clear.
- Unpermissive PDBs (
PDB_UNPERMISSIVE): For requests solely aboutPDB_UNPERMISSIVEor drains blocked by"Cannot evict pod as it would violate the pod's disruption budget."on a matching PDB, stop and point the user to When GKE identifies workloads with vulnerability to disruption and Troubleshoot node pool upgrades taking longer than usual to adjustminAvailableormaxUnavailablethemselves. In an audit, handle matching unpermissive PDBs via "When a matching PDB already exists".- Other GKE topics: Hand off general probe/PDB setup to
gke-reliability, upgrade planning togke-upgrades,PendingPods togke-workload-troubleshooting, autoscaling/stockouts togke-cluster-autoscaler, ComputeClasses togke-compute-classes, and general manifest generation togke-manifest-generation.- Provided manifests, insights, or
kubectloutput: After the Managed Airflow check, if insight/recommendation details, manifests, orkubectloutput are provided, capture any{project_id},{cluster_name}, and{location}, skip Steps 1–2 (honoring dismissed recommendations per Step 2), and evaluate every workload in Step 3 without discovery commands.
Step 1: Identify the target cluster
Obtain {project_id}, {cluster_name}, and {location} (control plane region
or zone) from the prompt. If {project_id} is unknown, ask the user; if
{cluster_name} or {location} is unknown, ask the user or follow
View your clusters
for {project_id}. Ask when it isn't clear whether {cluster_name} belongs to
a Managed Airflow environment.
Step 2: Check for PDB_UNPROTECTED_STATEFULSET insights and recommendations
- Query insights: Under
Identify workloads with vulnerability to disruption,
disruption-readiness insights are available only via
gcloudor the Recommender API (not the Google Cloud console). Followgcloudor API instructions in [View insights and recommendations](https://docs.cloud.google.com/kubernetes-engine/d
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
121.1kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
hyperframes
89.6kOpen-source AI video editor: edit your own footage, or create and remake any video with Claude Code, Codex or the free Studio app. Write HTML, render MP4. By HeyGen.
ai-job-search
73.3kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.6kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
