From 81dfd0cd00c2fdcc99d01f5eb629d1cc24e55c72 Mon Sep 17 00:00:00 2001 From: Sergey Kanzhelev Date: Tue, 4 Apr 2023 05:57:54 -0700 Subject: [PATCH] gRPC GA (#39919) --- .../_posts/2022-05-13-grpc-probes-in-beta.md | 1 + .../concepts/workloads/pods/pod-lifecycle.md | 5 +---- .../feature-gates.md | 8 +++++-- ...igure-liveness-readiness-startup-probes.md | 22 ++++++++++++------- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/content/en/blog/_posts/2022-05-13-grpc-probes-in-beta.md b/content/en/blog/_posts/2022-05-13-grpc-probes-in-beta.md index e4a9ab0092..77cf06d104 100644 --- a/content/en/blog/_posts/2022-05-13-grpc-probes-in-beta.md +++ b/content/en/blog/_posts/2022-05-13-grpc-probes-in-beta.md @@ -7,6 +7,7 @@ slug: grpc-probes-now-in-beta **Author**: Sergey Kanzhelev (Google) +_Update: Since this article was posted, the feature was graduated to GA in v1.27 and doesn't require any feature gates to be enabled. With Kubernetes 1.24 the gRPC probes functionality entered beta and is available by default. Now you can configure startup, liveness, and readiness probes for your gRPC app diff --git a/content/en/docs/concepts/workloads/pods/pod-lifecycle.md b/content/en/docs/concepts/workloads/pods/pod-lifecycle.md index e37e8ac92d..b209a6a65f 100644 --- a/content/en/docs/concepts/workloads/pods/pod-lifecycle.md +++ b/content/en/docs/concepts/workloads/pods/pod-lifecycle.md @@ -302,10 +302,7 @@ Each probe must define exactly one of these four mechanisms: The target should implement [gRPC health checks](https://grpc.io/grpc/core/md_doc_health-checking.html). The diagnostic is considered successful if the `status` - of the response is `SERVING`. - gRPC probes are an alpha feature and are only available if you - enable the `GRPCContainerProbe` - [feature gate](/docs/reference/command-line-tools-reference/feature-gates/). + of the response is `SERVING`. `httpGet` : Performs an HTTP `GET` request against the Pod's IP diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates.md b/content/en/docs/reference/command-line-tools-reference/feature-gates.md index f1dd7e6721..25c3f1c3f6 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates.md @@ -101,8 +101,6 @@ For a reference to old feature gates that are removed, please refer to | `ExpandedDNSConfig` | `false` | Alpha | 1.22 | 1.25 | | `ExpandedDNSConfig` | `true` | Beta | 1.26 | | | `ExperimentalHostUserNamespaceDefaulting` | `false` | Beta | 1.5 | | -| `GRPCContainerProbe` | `false` | Alpha | 1.23 | 1.23 | -| `GRPCContainerProbe` | `true` | Beta | 1.24 | | | `GracefulNodeShutdown` | `false` | Alpha | 1.20 | 1.20 | | `GracefulNodeShutdown` | `true` | Beta | 1.21 | | | `GracefulNodeShutdownBasedOnPodPriority` | `false` | Alpha | 1.23 | 1.23 | @@ -293,6 +291,12 @@ For a reference to old feature gates that are removed, please refer to | `ExecProbeTimeout` | `true` | GA | 1.20 | - | | `JobMutableNodeSchedulingDirectives` | `true` | Beta | 1.23 | 1.26 | | `JobMutableNodeSchedulingDirectives` | `true` | GA | 1.27 | | +| `GRPCContainerProbe` | `false` | Alpha | 1.23 | 1.23 | +| `GRPCContainerProbe` | `true` | Beta | 1.24 | 1.26 | +| `GRPCContainerProbe` | `true` | GA | 1.27 | | +| `IdentifyPodOS` | `false` | Alpha | 1.23 | 1.23 | +| `IdentifyPodOS` | `true` | Beta | 1.24 | 1.24 | +| `IdentifyPodOS` | `true` | GA | 1.25 | - | | `JobTrackingWithFinalizers` | `false` | Alpha | 1.22 | 1.22 | | `JobTrackingWithFinalizers` | `false` | Beta | 1.23 | 1.24 | | `JobTrackingWithFinalizers` | `true` | Beta | 1.25 | 1.25 | diff --git a/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md b/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md index bafa4e3699..b8d91a824b 100644 --- a/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md +++ b/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md @@ -240,21 +240,27 @@ kubectl describe pod goproxy {{< feature-state for_k8s_version="v1.24" state="beta" >}} -If your application implements [gRPC Health Checking Protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md), -kubelet can be configured to use it for application liveness checks. -You must enable the `GRPCContainerProbe` -[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) -in order to configure checks that rely on gRPC. +If your application implements the [gRPC Health Checking Protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md), +this example shows how to configure Kubernetes to use it for application liveness checks. +Similarly you can configure readiness and startup probes. Here is an example manifest: {{< codenew file="pods/probe/grpc-liveness.yaml" >}} -To use a gRPC probe, `port` must be configured. If the health endpoint is configured -on a non-default service, you must also specify the `service`. +To use a gRPC probe, `port` must be configured. If you want to distinguish probes of different types +and probes for different features you can use the `service` field. +You can set `service` to the value `liveness` and make your gRPC Health Checking endpoint +respond to this request differently then when you set `service` set to `readiness`. +This lets you use the same endpoint for different kinds of container health check +(rather than needing to listen on two different ports). +If you want to specify your own custom service name and also specify a probe type, +the Kubernetes project recommends that you use a name that concatenates +those. For example: `myservice-liveness` (using `-` as a separator). {{< note >}} -Unlike HTTP and TCP probes, named ports cannot be used and custom host cannot be configured. +Unlike HTTP or TCP probes, you cannot specify the healthcheck port by name, and you +cannot configure a custom hostname. {{< /note >}} Configuration problems (for example: incorrect port and service, unimplemented health checking protocol)