@@ -274,16 +274,11 @@ After 15 seconds, view Pod events to verify that the liveness check has not fail
274
274
kubectl describe pod etcd-with-grpc
275
275
```
276
276
277
- Before Kubernetes 1.23, gRPC health probes were often implemented using
278
- [ grpc-health-probe] ( https://github.com/grpc-ecosystem/grpc-health-probe/ ) ,
279
- as described in the blog post
280
- [ Health checking gRPC servers on Kubernetes] ( /blog/2018/10/01/health-checking-grpc-servers-on-kubernetes/ ) .
281
- The built-in gRPC probe's behavior is similar to the one implemented by grpc-health-probe.
282
- When migrating from grpc-health-probe to built-in probes, remember the following differences:
283
-
284
- - Built-in probes run against the pod IP address, unlike grpc-health-probe that often runs against
285
- ` 127.0.0.1 ` . Be sure to configure your gRPC endpoint to listen on the Pod's IP address.
286
- - Built-in probes do not support any authentication parameters (like ` -tls ` ).
277
+ When using a gRPC probe, there are some technical details to be aware of:
278
+
279
+ - The probes run against the pod IP address or its hostname.
280
+ Be sure to configure your gRPC endpoint to listen on the Pod's IP address.
281
+ - The probes do not support any authentication parameters (like ` -tls ` ).
287
282
- There are no error codes for built-in probes. All errors are considered as probe failures.
288
283
- If ` ExecProbeTimeout ` feature gate is set to ` false ` , grpc-health-probe does ** not**
289
284
respect the ` timeoutSeconds ` setting (which defaults to 1s), while built-in probe would fail on timeout.
@@ -425,23 +420,6 @@ liveness and readiness checks:
425
420
See [probe-level `terminationGracePeriodSeconds`](#probe-level-terminationgraceperiodseconds)
426
421
for more detail.
427
422
428
- {{< note >}}
429
- Before Kubernetes 1.20, the field `timeoutSeconds` was not respected for exec probes :
430
- probes continued running indefinitely, even past their configured deadline,
431
- until a result was returned.
432
-
433
- This defect was corrected in Kubernetes v1.20. You may have been relying on the previous behavior,
434
- even without realizing it, as the default timeout is 1 second.
435
- As a cluster administrator, you can disable the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
436
- ` ExecProbeTimeout` (set it to `false`) on each kubelet to restore the behavior from older versions,
437
- then remove that override once all the exec probes in the cluster have a `timeoutSeconds` value set.
438
- If you have pods that are impacted from the default 1 second timeout, you should update their
439
- probe timeout so that you're ready for the eventual removal of that feature gate.
440
-
441
- With the fix of the defect, for exec probes, on Kubernetes `1.20+` with the `dockershim` container runtime,
442
- the process inside the container may keep running even after probe returned failure because of the timeout.
443
- {{< /note >}}
444
-
445
423
{{< caution >}}
446
424
Incorrect implementation of readiness probes may result in an ever growing number
447
425
of processes in the container, and resource starvation if this is left unchecked.
@@ -518,34 +496,19 @@ to resolve it.
518
496
519
497
{{< feature-state for_k8s_version="v1.28" state="stable" >}}
520
498
521
- Prior to release 1.21, the Pod-level `terminationGracePeriodSeconds` was used
522
- for terminating a container that failed its liveness or startup probe. This
523
- coupling was unintended and may have resulted in failed containers taking an
524
- unusually long time to restart when a Pod-level `terminationGracePeriodSeconds`
525
- was set.
526
-
527
499
In 1.25 and above, users can specify a probe-level `terminationGracePeriodSeconds`
528
500
as part of the probe specification. When both a pod- and probe-level
529
501
` terminationGracePeriodSeconds` are set, the kubelet will use the probe-level value.
530
502
531
- {{< note >}}
532
- Beginning in Kubernetes 1.25, the `ProbeTerminationGracePeriod` feature is enabled
533
- by default. For users choosing to disable this feature, please note the following :
503
+ When setting the `terminationGracePeriodSeconds`, please note the following :
534
504
535
- * The `ProbeTerminationGracePeriod` feature gate is only available on the API Server.
536
- The kubelet always honors the probe-level `terminationGracePeriodSeconds` field if
505
+ * The kubelet always honors the probe-level `terminationGracePeriodSeconds` field if
537
506
it is present on a Pod.
538
507
539
508
* If you have existing Pods where the `terminationGracePeriodSeconds` field is set and
540
509
you no longer wish to use per-probe termination grace periods, you must delete
541
510
those existing Pods.
542
511
543
- * When you or the control plane, or some other components create replacement
544
- Pods, and the feature gate `ProbeTerminationGracePeriod` is disabled, then the
545
- API server ignores the Probe-level `terminationGracePeriodSeconds` field, even if
546
- a Pod or pod template specifies it.
547
- {{< /note >}}
548
-
549
512
For example :
550
513
551
514
` ` ` yaml
0 commit comments