Home / Market / gke statefulset without probes

gke statefulset without probes

Audits, detects, and proposes fixes for GKE StatefulSets that are protected by a PodDisruptionBudget (PDB) but lack container readiness probes (GKE insight subtype PDB_STATEFULSET_WITHOUT_PROBES), causing replacement Pods to be counted as healthy before they are ready during voluntary disruptions. Use when asked to check, audit, or propose fixes for the PDB_STATEFULSET_WITHOUT_PROBES condition, missing readinessProbe configurations on PDB-protected GKE StatefulSets, or premature eviction of Stat

skill★ 255310 dlgithubApache-2.0Install in CosmosUpstream Source

Documentation & Preview

--- name: gke-statefulset-without-probes metadata: version: "1.0.0" category: Containers description: >- Audits, detects, and proposes fixes for GKE StatefulSets that are protected by a PodDisruptionBudget (PDB) but lack container readiness probes (GKE insight subtype PDB_STATEFULSET_WITHOUT_PROBES), causing replacement Pods to be counted as healthy before they are ready during voluntary disruptions. Use when asked to check, audit, or propose fixes for the PDB_STATEFULSET_WITHOUT_PROBES condition, missing readinessProbe configurations on PDB-protected GKE StatefulSets, or premature eviction of StatefulSet replicas during node pool upgrades or drains despite having a PDB. Don't use for StatefulSets missing a PDB (PDB_UNPROTECTED_STATEFULSET), PDBs that allow zero disruptions (PDB_UNPERMISSIVE), general probe and PDB setup unrelated to this condition (use gke-reliability), Pods stuck in Pending (use gke-workload-troubleshooting), ComputeClass configuration (use gke-compute-classes), manifest generation (use gke-manifest-generation), or cluster upgrade planning (use gke-upgrades).

---

GKE StatefulSet without readiness probes

Use this skill to find, verify, and propose fixes for StatefulSet workloads in GKE clusters that are configured with a PodDisruptionBudget (PDB) but without container readiness probes (readinessProbe), corresponding to the PDB_STATEFULSET_WITHOUT_PROBES insight subtype.

As explained in the section When GKE identifies workloads with vulnerability to disruption, PDBs respect readiness probes when they look at which Pods can be counted as healthy. Therefore, if a Pod covered by a PDB does not have a readiness probe configured, the PDB has limited visibility into whether the Pod is healthy or is just up and running. A Pod is considered healthy by a PDB when its Ready condition is True (see the section Healthiness of a Pod), and a container without a readiness probe defaults to a Success readiness state once started (see the section Probe results).

> Read-only rule: Run read-only diagnostic commands only. Never drain, > delete, or re-create nodes, never dismiss a recommendation, and never run any > other command that changes the cluster. Give the user any fix to apply > themselves.

When guiding the user or recommending a check or fix, always include the exact linked section names and URLs from this skill in your response (do not search local repository files to copy commands).

Usage attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.

Prerequisites

authentication) and enable the Kubernetes Engine API (container.googleapis.com), follow the instructions in the section Before you begin. Also ensure that the Recommender API (recommender.googleapis.com) is enabled to view insights and recommendations.

"Install kubectl", "Install required plugins", and "Store cluster information for kubectl" sections of Install kubectl and configure cluster access.

Billing account attached.

and GKE diagnosis insights and recommendations.

(Sections: "Identify workloads with vulnerability to disruption", "When GKE identifies workloads with vulnerability to disruption", "Implement the guidance to improve disruption readiness")

(Sections: "Before you begin", "View insights and recommendations")

(Sections: "Inspecting a StatefulSet", "Updating a StatefulSet", "Inspecting update rollout", "Update strategies")

(Sections: "Install kubectl", "Install required plugins", "Store cluster information for kubectl")

(Sections: "View your clusters")

(Sections: "Create a Redis Cluster on GKE")

(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")

(Sections: "Automatic node upgrades")

(Sections: "Troubleshoot node pool upgrades taking longer than usual")

(Sections: "Environment's cluster")

(Sections: "Before you contact support", "Recommendations for efficient support")

(Sections: "Define readiness probes", "Define a liveness command")

(Sections: "Liveness probe", "Startup probe", "Check mechanisms", "Probe results")

(Sections: "Specifying a PodDisruptionBudget", "Healthiness of a Pod", "Check the status of the PDB", "Unhealthy Pod Eviction Policy")

This skill only reads cluster and recommender state and creates no billable resources, so no teardown is required.

--------------------------------------------------------------------------------

Diagnostic workflow

> Scope check: If the user says that the cluster belongs to a Managed > Service for Apache Airflow (formerly Cloud Composer) environment, don't > propose changes to its workloads, because clusters for Managed Airflow and > workloads deployed into them are managed by Google, and introducing changes in > the environment's cluster might break the environment (see the section > Environment's cluster). > If you aren't sure whether the cluster belongs to a Managed Airflow > environment, ask the user. If the problem is a StatefulSet that has no > matching PDB at all (PDB_UNPROTECTED_STATEFULSET), or an existing PDB is > impossible to adhere to for maintenance because its minAvailable setting is > not less than the total Pod count or its maxUnavailable setting is zero > (PDB_UNPERMISSIVE, or node pool upgrades stall with > "Cannot evict pod as it would violate the pod's disruption budget." as > described in the section > Troubleshoot node pool upgrades taking longer than usual), > stop using this skill and point the user to the PDB_UNPROTECTED_STATEFULSET > or PDB_UNPERMISSIVE action in the section > When GKE identifies workloads with vulnerability to disruption. > Note that disruptionsAllowed: 0 on a PDB can also occur temporarily while a > replacement Pod is not Ready yet (see the "Check the status of the PDB" and > "Healthiness of a Pod" sections of > Specifying a Disruption Budget for your Application). > If Pods are stuck in Pending, use gke-workload-troubleshooting instead, > because PDBs and readiness probes do not control initial Pod scheduling.

> Inline telemetry: If the user already provides the StatefulSet and > PodDisruptionBudget specifications in the prompt (and the cluster does not > belong to a Managed Airflow environment), skip Steps 1–2 and evaluate all > provided workloads directly in Step 3 without running terminal commands or > searching the workspace.

Step 1: Identify the cluster

Obtain {project_id}, {cluster_name}, and {location} from the user prompt. If the cluster is unknown, ask the user, or follow the instructions in the section View your clusters to list clusters in {project_id}. If you aren't sure whether {cluster_name} belongs to a Managed Airflow environment, ask the user (see the Scope check above and the section Environment's cluster).

Step 2: Get the insight and inspect live resources

  1. Get the insight and recommendation: As documented in the section

Identify workloads with vulnerability to disruption, disruption readiness insights are viewed using the Google Cloud CLI or the Recommender API and are not available in the Google Cloud console. To find StatefulSets with this insight in {project_id} and {location}, follow the gcloud or API instructions in the section View insights and recommendations, filter for the PDB_STATEFULSET_WITHOUT_PROBES subtype, and read the associated recommendation.

StatefulSet has the PDB_STATEFULSET_WITHOUT_PROBES insight, and note that recommendations are assessed once daily (see the section Implement the guidance to improve disruption readiness). If the user named or pasted a StatefulSet, still check its live state in items 2–3 below because a recent change might not have an insight yet. If no insight was found and the user reported early replica evictions during an upgrade or drain, follow the secti