1
---
2
name: gke-statefulset-without-probes
3
metadata:
4
version: "1.0.0"
5
category: Containers
6
description: >-
7
Audits, detects, and proposes fixes for GKE StatefulSets that are protected
8
by a PodDisruptionBudget (PDB) but lack container readiness probes (GKE
9
insight subtype PDB_STATEFULSET_WITHOUT_PROBES), causing replacement Pods to
10
be counted as healthy before they are ready during voluntary disruptions. Use
11
when asked to check, audit, or propose fixes for the
12
PDB_STATEFULSET_WITHOUT_PROBES condition, missing readinessProbe
13
configurations on PDB-protected GKE StatefulSets, or premature eviction of
14
StatefulSet replicas during node pool upgrades or drains despite having a
15
PDB. Don't use for StatefulSets missing a PDB (PDB_UNPROTECTED_STATEFULSET),
16
PDBs that allow zero disruptions (PDB_UNPERMISSIVE), general probe and PDB
17
setup unrelated to this condition (use gke-reliability), Pods stuck in
18
Pending (use gke-workload-troubleshooting), ComputeClass configuration (use
19
gke-compute-classes), manifest generation (use gke-manifest-generation), or
20
cluster upgrade planning (use gke-upgrades).
21
---
22
23
# GKE StatefulSet without readiness probes
24
25
Use this skill to find, verify, and propose fixes for `StatefulSet` workloads in
26
GKE clusters that are configured with a `PodDisruptionBudget` (PDB) but without
27
container readiness probes (`readinessProbe`), corresponding to the
28
`PDB_STATEFULSET_WITHOUT_PROBES` insight subtype.
29
30
As explained in the section
31
[When GKE identifies workloads with vulnerability to disruption](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt),
32
PDBs respect readiness probes when they look at which Pods can be counted as
33
healthy. Therefore, if a Pod covered by a PDB does not have a readiness probe
34
configured, the PDB has limited visibility into whether the Pod is healthy or is
35
just up and running. A Pod is considered healthy by a PDB when its `Ready`
36
condition is `True` (see the section
37
[Healthiness of a Pod](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)),
38
and a container without a readiness probe defaults to a `Success` readiness
39
state once started (see the section
40
[Probe results](https://kubernetes.io/docs/concepts/workloads/pods/probes/)).
41
42
> **Read-only rule**: Run read-only diagnostic commands only. Never drain,
43
> delete, or re-create nodes, never dismiss a recommendation, and never run any
44
> other command that changes the cluster. Give the user any fix to apply
45
> themselves.
46
47
When guiding the user or recommending a check or fix, always include the exact
48
linked section names and URLs from this skill in your response (do not search
49
local repository files to copy commands).
50
51
## Usage attribution
52
53
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you MUST
54
read and follow the instructions in
55
[Usage Attribution](references/attribution.md).
56
57
## Prerequisites
58
59
- **Google Cloud SDK and tools**:
60
- To install and initialize `gcloud` (project selection and
61
authentication) and enable the Kubernetes Engine API
62
(`container.googleapis.com`), follow the instructions in the section
63
[Before you begin](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/optimize-with-recommenders.md.txt).
64
Also ensure that the Recommender API (`recommender.googleapis.com`) is
65
enabled to view insights and recommendations.
66
- To install `kubectl` and configure cluster credentials, follow the
67
"Install kubectl", "Install required plugins", and "Store cluster
68
information for kubectl" sections of
69
[Install kubectl and configure cluster access](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl.md.txt).
70
- **Billing**: Verify that the Google Cloud project has an active Cloud
71
Billing account attached.
72
- **IAM roles**:
73
- `roles/container.viewer` to read cluster details, StatefulSets, PDBs,
74
and GKE diagnosis insights and recommendations.
75
- `roles/container.developer` only if the user later applies the fix.
76
- **Documentation**:
77
- [Ensure workloads are disruption-ready](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt)
78
(Sections: "Identify workloads with vulnerability to disruption", "When
79
GKE identifies workloads with vulnerability to disruption", "Implement
80
the guidance to improve disruption readiness")
81
- [Optimize your usage of GKE with insights and recommendations](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/optimize-with-recommenders.md.txt)
82
(Sections: "Before you begin", "View insights and recommendations")
83
- [Deploying a stateful application](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/stateful-apps.md.txt)
84
(Sections: "Inspecting a StatefulSet", "Updating a StatefulSet",
85
"Inspecting update rollout", "Update strategies")
86
- [Install kubectl and configure cluster access](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl.md.txt)
87
(Sections: "Install kubectl", "Install required plugins", "Store cluster
88
information for kubectl")
89
- [Manage clusters](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/managing-clusters.md.txt)
90
(Sections: "View your clusters")
91
- [Deploy a Redis cluster on GKE](https://docs.cloud.google.com/kubernetes-engine/docs/tutorials/upgrading-stateful-workload.md.txt)
92
(Sections: "Create a Redis Cluster on GKE")
93
- [Node upgrade strategies](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies.md.txt)
94
(Sections: "maxSurge: GKE creates a new surge node before removing an
95
existing one", "maxUnavailable: GKE makes an existing node unavailable
96
to recreate it", "Phase 3: Drain blue pool")
97
- [Autopilot cluster upgrades](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades-autopilot.md.txt)
98
(Sections: "Automatic node upgrades")
99
- [Troubleshoot cluster upgrades](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/upgrades.md.txt)
100
(Sections: "Troubleshoot node pool upgrades taking longer than usual")
101
- [Environment architecture](https://docs.cloud.google.com/composer/docs/composer-2/environment-architecture.md.txt)
102
(Sections: "Environment's cluster")
103
- [Get support](https://docs.cloud.google.com/kubernetes-engine/docs/getting-support.md.txt)
104
(Sections: "Before you contact support", "Recommendations for efficient
105
support")
106
- [Configure Liveness, Readiness and Startup Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
107
(Sections: "Define readiness probes", "Define a liveness command")
108
- [Liveness, Readiness, and Startup Probes](https://kubernetes.io/docs/concepts/workloads/pods/probes/)
109
(Sections: "Liveness probe", "Startup probe", "Check mechanisms", "Probe
110
results")
111
- [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
112
(Sections: "Specifying a PodDisruptionBudget", "Healthiness of a Pod",
113
"Check the status of the PDB", "Unhealthy Pod Eviction Policy")
114
115
This skill only reads cluster and recommender state and creates no billable
116
resources, so no teardown is required.
117
118
--------------------------------------------------------------------------------
119
120
## Diagnostic workflow
121
122
> **Scope check**: If the user says that the cluster belongs to a Managed
123
> Service for Apache Airflow (formerly Cloud Composer) environment, don't
124
> propose changes to its workloads, because clusters for Managed Airflow and
125
> workloads deployed into them are managed by Google, and introducing changes in
126
> the environment's cluster might break the environment (see the section
127
> [Environment's cluster](https://docs.cloud.google.com/composer/docs/composer-2/environment-architecture.md.txt)).
128
> If you aren't sure whether the cluster belongs to a Managed Airflow
129
> environment, ask the user. If the problem is a StatefulSet that has no
130
> matching PDB at all (`PDB_UNPROTECTED_STATEFULSET`), or an existing PDB is
131
> impossible to adhere to for maintenance because its `minAvailable` setting is
132
> not less than the total Pod count or its `maxUnavailable` setting is zero
133
> (`PDB_UNPERMISSIVE`, or node pool upgrades stall with
134
> `"Cannot evict pod as it would violate the pod's disruption budget."` as
135
> described in the section
136
> [Troubleshoot node pool upgrades taking longer than usual](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/upgrades.md.txt)),
137
> stop using this skill and point the user to the `PDB_UNPROTECTED_STATEFULSET`
138
> or `PDB_UNPERMISSIVE` action in the section
139
> [When GKE identifies workloads with vulnerability to disruption](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt).
140
> Note that `disruptionsAllowed: 0` on a PDB can also occur temporarily while a
141
> replacement Pod is not `Ready` yet (see the "Check the status of the PDB" and
142
> "Healthiness of a Pod" sections of
143
> [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)).
144
> If Pods are stuck in `Pending`, use `gke-workload-troubleshooting` instead,
145
> because PDBs and readiness probes do not control initial Pod scheduling.
146
147
> **Inline telemetry**: If the user already provides the `StatefulSet` and
148
> `PodDisruptionBudget` specifications in the prompt (and the cluster does not
149
> belong to a Managed Airflow environment), skip Steps 1–2 and evaluate all
150
> provided workloads directly in Step 3 without running terminal commands or
151
> searching the workspace.
152
153
### Step 1: Identify the cluster
154
155
Obtain `{project_id}`, `{cluster_name}`, and `{location}` from the user prompt.
156
If the cluster is unknown, ask the user, or follow the instructions in the
157
section
158
[View your clusters](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/managing-clusters.md.txt)
159
to list clusters in `{project_id}`. If you aren't sure whether `{cluster_name}`
160
belongs to a Managed Airflow environment, ask the user (see the Scope check
161
above and the section
162
[Environment's cluster](https://docs.cloud.google.com/composer/docs/composer-2/environment-architecture.md.txt)).
163
164
### Step 2: Get the insight and inspect live resources
165
166
1. **Get the insight and recommendation**: As documented in the section
167
[Identify workloads with vulnerability to disruption](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt),
168
disruption readiness insights are viewed using the Google Cloud CLI or the
169
Recommender API and are not available in the Google Cloud console. To find
170
StatefulSets with this insight in `{project_id}` and `{location}`, follow
171
the `gcloud` or API instructions in the section
172
[View insights and recommendations](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/optimize-with-recommenders.md.txt),
173
filter for the `PDB_STATEFULSET_WITHOUT_PROBES` subtype, and read the
174
associated recommendation.
175
- **No insight**: If the insight list is empty, tell the user that no
176
StatefulSet has the `PDB_STATEFULSET_WITHOUT_PROBES` insight, and note
177
that recommendations are assessed once daily (see the section
178
[Implement the guidance to improve disruption readiness](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt)).
179
If the user named or pasted a StatefulSet, still check its live state in
180
items 2–3 below because a recent change might not have an insight yet.
181
If no insight was found and the user reported early replica evictions
182
during an upgrade or drain, follow the section "StatefulSet has
183
readiness probe" under Remediation.
184
- **Cannot get the insight**: If you cannot retrieve the insight (for
185
example, because the Recommender API `recommender.googleapis.com` is not
186
enabled or permissions are missing), point the user to the section
187
[View insights and recommendations](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/optimize-with-recommenders.md.txt)
188
and the Recommender API prerequisite in Prerequisites, and if the user
189
named a StatefulSet, continue to items 2–3 below.
190
2. **Configure `kubectl` access and check PDBs**: For each StatefulSet that the
191
insight flags, and for any StatefulSet that the user names, configure
192
`kubectl` to communicate with `{cluster_name}` in `{location}` by following
193
the section
194
[Store cluster information for kubectl](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl.md.txt).
195
Then list and inspect the `PodDisruptionBudget` objects in the namespace by
196
following the section
197
[Check the status of the PDB](https://kubernetes.io/docs/tasks/run-application/configure-pdb/),
198
and check their selectors (see the section
199
[Specifying a PodDisruptionBudget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)).
200
3. **Inspect `StatefulSet` configurations and probes**: Check the live state of
201
each StatefulSet that the insight flags, and of any StatefulSet that the
202
user names, by following the section
203
[Inspecting a StatefulSet](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/stateful-apps.md.txt).
204
Check its Pod selector (`spec.selector.matchLabels`) and whether any
205
container in `spec.template.spec.containers` defines `readinessProbe` (and
206
whether `livenessProbe` is configured).
207
4. **When you cannot run `gcloud` or `kubectl`**: If you can't run `gcloud` or
208
`kubectl`, or the user wants to run the checks, don't write custom scripts.
209
Point the user to the sections linked in this step, and continue with Step 3
210
when the user pastes the output back.
211
212
### Step 3: Evaluate PDB coverage and container readiness probes
213
214
Evaluate every StatefulSet in scope:
215
216
1. **Check namespace-scoped PDB coverage**:
217
- Check whether a `PodDisruptionBudget` in the same namespace
218
(`{namespace}`) selects the StatefulSet's Pods
219
(`spec.selector.matchLabels`) by following the selector rules in the
220
section
221
[Specifying a PodDisruptionBudget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/).
222
- **StatefulSets without a matching PDB**: If no PDB in `{namespace}`
223
matches the StatefulSet's Pod selector labels, classify it as
224
**`StatefulSet Not Protected by PDB`**. Per the
225
`PDB_UNPROTECTED_STATEFULSET` entry in the section
226
[When GKE identifies workloads with vulnerability to disruption](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt),
227
all Pods in the StatefulSet can be taken down during an event such as a
228
node upgrade. List each such StatefulSet in one line and point the user
229
to the `PDB_UNPROTECTED_STATEFULSET` action in that section.
230
2. **Check container readiness probes**: For each PDB-protected StatefulSet,
231
check `spec.template.spec.containers`:
232
- **Missing readiness probe (`0` containers define `readinessProbe`)**: If
233
none of the containers in `spec.template.spec.containers` define a
234
`readinessProbe`, classify the workload as
235
**`StatefulSet Protected by PDB Without Readiness Probe`**. A
236
`livenessProbe` or `startupProbe` alone does not satisfy this check,
237
which the section
238
[When GKE identifies workloads with vulnerability to disruption](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt)
239
defines as "without readiness probes": liveness probes determine when to
240
restart a container (see the section
241
[Liveness probe](https://kubernetes.io/docs/concepts/workloads/pods/probes/)),
242
and startup probes are only executed at startup (see the section
243
[Startup probe](https://kubernetes.io/docs/concepts/workloads/pods/probes/)).
244
By contrast, PDBs count Ready Pods (see the section
245
[Healthiness of a Pod](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)),
246
and a container with no readiness probe defaults to a `Success`
247
readiness state once started (see the section
248
[Probe results](https://kubernetes.io/docs/concepts/workloads/pods/probes/)).
249
- **Has readiness probe (`>= 1` container defines `readinessProbe`)**: If
250
at least one container in `spec.template.spec.containers` defines a
251
`readinessProbe`, classify the workload as
252
**`StatefulSet Has Readiness Probe`** and follow the section
253
"StatefulSet has readiness probe" under Remediation. If no StatefulSet
254
is missing a `readinessProbe` (or no insight was found) and the user
255
reported early replica evictions during an upgrade or drain, also follow
256
the section "StatefulSet has readiness probe" under Remediation.
257
258
### Step 4: Classify each evaluated StatefulSet
259
260
Classify evaluated workloads using these categories:
261
262
| Classification | Next step |
263
| :--- | :--- |
264
| `StatefulSet Protected by PDB Without Readiness Probe` | Add readiness probe |
265
| `StatefulSet Has Readiness Probe` | Check liveness / drain |
266
| `StatefulSet Not Protected by PDB` | Point to action |
267
268
--------------------------------------------------------------------------------
269
270
## Remediation
271
272
Propose these changes for the user to review and apply.
273
274
### StatefulSet protected by PDB without readiness probe
275
276
1. **Add readiness and liveness probes**: Follow the action in the section
277
[When GKE identifies workloads with vulnerability to disruption](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt):
278
add readiness probes to Pods in StatefulSets for the covering PDB, and also
279
recommend adding liveness probes. Point the user to the "Define readiness
280
probes" and "Define a liveness command" sections of
281
[Configure Liveness, Readiness and Startup Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
282
As an example of a StatefulSet with readiness and liveness probes on GKE,
283
point the user to the section
284
[Create a Redis Cluster on GKE](https://docs.cloud.google.com/kubernetes-engine/docs/tutorials/upgrading-stateful-workload.md.txt).
285
2. **Ask the user which check shows application readiness**: Ask the user which
286
check (`httpGet`, `exec`, `grpc`, or `tcpSocket`) indicates that their
287
application is ready to serve traffic, rather than picking a probe for them.
288
Explain that per the section
289
[Check mechanisms](https://kubernetes.io/docs/concepts/workloads/pods/probes/),
290
a `tcpSocket` check is considered successful if the port is open, so it can
291
succeed before the application finishes initializing.
292
3. **Apply and verify the update (user action only)**: Point the user to the
293
"Updating a StatefulSet" (to apply the change), "Update strategies", and
294
"Inspecting update rollout" (to check the rollout) sections of
295
[Deploying a stateful application](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/stateful-apps.md.txt).
296
Note that changing the Pod template in a StatefulSet can trigger a rolling
297
update of its replicas, depending on the StatefulSet's `updateStrategy`, and
298
do not run the commands in those sections yourself because they modify the
299
StatefulSet (`kubectl apply`, `kubectl edit`, and `kubectl rollout undo`).
300
4. **Resolution delay and dismissing the recommendation**: Tell the user that
301
recommendations are assessed once daily, so it may take up to 24 hours for
302
the recommendation to resolve after a change is implemented, and that they
303
can dismiss the recommendation if they decide not to add a probe (see the
304
section
305
[Implement the guidance to improve disruption readiness](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt)).
306
Never dismiss a recommendation yourself.
307
308
### StatefulSet has readiness probe
309
310
1. **Explain the 24-hour resolution delay if the insight is still present**: If
311
the StatefulSet already defines a `readinessProbe` (for example, because the
312
user recently added one) and the `PDB_STATEFULSET_WITHOUT_PROBES` insight or
313
recommendation is still visible, tell the user that recommendations are
314
assessed once daily, so it may take up to 24 hours for the recommendation to
315
resolve after a change is implemented (see the section
316
[Implement the guidance to improve disruption readiness](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt)).
317
Never dismiss a recommendation yourself.
318
2. **Check liveness probe configuration**: If the StatefulSet already defines a
319
`readinessProbe` but has no `livenessProbe`, mention the recommendation in
320
the section
321
[When GKE identifies workloads with vulnerability to disruption](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt)
322
to also add liveness probes (see the section
323
[Define a liveness command](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)).
324
3. **When replicas were still evicted before replacement Pods were ready**: If
325
a `readinessProbe` exists on the StatefulSet (or no missing-probe
326
StatefulSet was found) but replicas were still evicted early during an
327
upgrade or drain, point the user to these documented causes:
328
- **Surge or blue-green upgrade drain limits**: During surge upgrades on
329
Standard node pools, GKE respects PDBs for up to one hour, and after one
330
hour any remaining Pods are forcefully evicted so that the upgrade can
331
proceed (see the "maxSurge: GKE creates a new surge node before removing
332
an existing one" and "maxUnavailable: GKE makes an existing node
333
unavailable to recreate it" sections of
334
[Node upgrade strategies](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies.md.txt));
335
on Autopilot clusters, `PodDisruptionBudget` is also respected for 1
336
hour during node upgrades (see the section
337
[Automatic node upgrades](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades-autopilot.md.txt)).
338
In blue-green upgrades, Pods with PDB violations are deleted when the
339
blue pool is deleted (see the section
340
[Phase 3: Drain blue pool](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies.md.txt)).
341
- **PDB `unhealthyPodEvictionPolicy: AlwaysAllow`**: With
342
`unhealthyPodEvictionPolicy: AlwaysAllow` on the PDB, running Pods that
343
are not healthy yet can be evicted regardless of whether the criteria in
344
a PDB are met (see the section
345
[Unhealthy Pod Eviction Policy](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)).
346
- **Readiness probe succeeds before the application is ready**: A
347
readiness probe that succeeds before initialization completes—such as a
348
`tcpSocket` check, which is considered successful as soon as the port is
349
open—marks the Pod `Ready` prematurely (see the section
350
[Check mechanisms](https://kubernetes.io/docs/concepts/workloads/pods/probes/)).
351
- **Escalate if unexplained**: If none of these sections explains the
352
early eviction, direct the user to Cloud Customer Care by following the
353
"Before you contact support" and "Recommendations for efficient support"
354
sections of
355
[Get support](https://docs.cloud.google.com/kubernetes-engine/docs/getting-support.md.txt).
356
357
--------------------------------------------------------------------------------
358
359
## Output format
360
361
Report the audit in this structure. Include all workloads classified as
362
`StatefulSet Protected by PDB Without Readiness Probe` in the summary table and
363
per-workload remediation sections. If any evaluated StatefulSet has no matching
364
PDB (`StatefulSet Not Protected by PDB`), list it in one line and point the user
365
to the `PDB_UNPROTECTED_STATEFULSET` action in the section
366
[When GKE identifies workloads with vulnerability to disruption](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt).
367
Do not include healthy (`StatefulSet Has Readiness Probe`) StatefulSets in the
368
summary table unless zero unhealthy StatefulSets exist or the user asked about a
369
specific workload by name.
370
371
```markdown
372
### Executive summary
373
374
Found {actionable_count} PDB-protected StatefulSet(s) lacking a container
375
`readinessProbe` on cluster `{cluster_name}` (`{location}`, Project:
376
`{project_id}`):
377
378
| StatefulSet | Namespace | Covering PDB | Readiness probe |
379
| :--- | :--- | :--- | :--- |
380
| `{name}` | `{namespace}` | `{pdb_name}` | Missing (`liveness`: `{status}`) |
381
382
### StatefulSet: `{name}` (`{namespace}`)
383
384
> **Diagnosis:** StatefulSet Protected by PDB Without Readiness Probe
385
386
**Root cause analysis:**
387
388
* **Missing readiness probe on PDB-protected StatefulSet:** StatefulSet
389
`{name}` ({replicas} replicas) is covered by PodDisruptionBudget
390
`{pdb_name}`, but container `{container_name}` has no `readinessProbe`
391
configured. A `livenessProbe` or `startupProbe` alone does not satisfy this
392
check: liveness probes determine when to restart a container (see the
393
section
394
[Liveness probe](https://kubernetes.io/docs/concepts/workloads/pods/probes/)),
395
and startup probes are only executed at startup (see the section
396
[Startup probe](https://kubernetes.io/docs/concepts/workloads/pods/probes/)).
397
* **Limited PDB visibility during disruptions:** PDBs respect readiness
398
probes when they look at which Pods can be counted as healthy (`Ready`
399
condition `True`; see the section
400
[Healthiness of a Pod](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)).
401
Because `{name}` has no `readinessProbe`, `{pdb_name}` has limited
402
visibility into whether a Pod is healthy or is just up and running (see the
403
section
404
[When GKE identifies workloads with vulnerability to disruption](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt)).
405
406
**Actionable remediation:**
407
408
* Ask which check shows that `{container_name}` in `{name}` is ready to serve
409
traffic (noting from the section
410
[Check mechanisms](https://kubernetes.io/docs/concepts/workloads/pods/probes/)
411
that a `tcpSocket` check succeeds as soon as the port is open), and add a
412
`readinessProbe` (and a `livenessProbe` if missing) by following the
413
"Define readiness probes" and "Define a liveness command" sections of
414
[Configure Liveness, Readiness and Startup Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
415
(see the section
416
[Create a Redis Cluster on GKE](https://docs.cloud.google.com/kubernetes-engine/docs/tutorials/upgrading-stateful-workload.md.txt)
417
for an example).
418
* To apply the Pod template change (which can trigger a rolling update of the
419
StatefulSet's replicas, depending on the StatefulSet's `updateStrategy`),
420
follow the "Updating a StatefulSet" and "Update strategies" sections of
421
[Deploying a stateful application](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/stateful-apps.md.txt).
422
423
### Verification
424
425
* To monitor and verify the StatefulSet rollout after applying the change,
426
follow the section
427
[Inspecting update rollout](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/stateful-apps.md.txt).
428
* Recommendations are assessed once daily, so it may take up to 24 hours for
429
the recommendation to resolve after a change is implemented (or you can
430
dismiss the recommendation if you decide not to add a probe; see the section
431
[Implement the guidance to improve disruption readiness](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt)).
432
433
Learn more:
434
[Ensure workloads are disruption-ready](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/workload-disruption-readiness.md.txt)
435
(Sections: "When GKE identifies workloads with vulnerability to disruption",
436
"Implement the guidance to improve disruption readiness") and
437
[Configure Liveness, Readiness and Startup Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
438
(Section: "Define readiness probes").
439
```
440