Cloud Service Mesh Gateway API で、透過的ヘルスチェックが提供されるようになりました。これは、Kubernetes の readiness ステータス データと統合されたユニバーサル ヘルスチェックで、準備完了とマークされた Pod へのトラフィック フローを有効にします。この機能は、HTTP サービスと gRPC サービスの両方で使用できます。
Cloud Service Mesh は、Kubernetes Pod のステータスを Google ヘルスチェック インフラストラクチャに直接公開します。そのため、Pod の readinessProbe に使用しているのと同じ構成が Google ロード バランシング ヘルスチェック インフラストラクチャに透過的に渡され、ヘルスチェックの状態が readiness プローブの状態と調整されます。これは、Transparent Health Checker というコンポーネントを使用して行われます。このコンポーネントは、Pod のヘルス ステータスを提供するすべてのノードで実行されます。
Cloud Service Mesh は、ヘルスチェック インフラストラクチャのソース範囲から送信されるヘルスチェック トラフィックを、予約済みポート(7877)に送信するように構成します。このトラフィックは、ノード上のローカルで透過的ヘルスチェック サーバーにリダイレクトされます。サーバーは、Kubernetes Pod readiness の現在の状態に一致するヘルス ステータスを返します。Kubernetes Pod へのトラフィック フローは、各 Pod に設定された Ready ステータスに基づいて制御されます。必要に応じて、readiness プローブと readiness ゲートの値で「Ready」ステータスを制御できます。透過的ヘルスチェックは、すべての Kubernetes 条件の論理演算子 AND に基づいてステータスを報告します。
Kubernetes プローブ、readiness ゲート、およびその他のチェックを構成して、Kubernetes Pod の readiness ステータスに影響を与えることができます。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-19 UTC。"],[],[],null,["# Configure Kubernetes readiness probes (Optional)\n================================================\n\nThis page describes how to use Cloud Service Mesh with Google Cloud health check infrastructure to configure Kubernetes probes and readiness gates.\n\nPrerequisites\n-------------\n\nAs a starting point, this guide assumes that you have already:\n\n- [Created a GKE cluster and registered it to a fleet](/service-mesh/docs/gateway/prepare-gateway#create_and_register_a_cluster).\n- [Installed the custom resource definitions](/service-mesh/docs/gateway/prepare-gateway#install_custom_resource_definitions).\n\nTransparent Healthchecks with CSM\n---------------------------------\n\nCloud Service Mesh Gateway API now offers Transparent health checks, that is, Universal HealthChecks integrated with Kubernetes readiness status data to enable traffic flow to the Pods that are marked ready. This capability is available for both HTTP and gRPC services.\n\nCloud Service Mesh exposes the status of your Kubernetes Pods directly to the Google health check infrastructure, so the same configuration you use for Pod readinessProbes will be passed transparently to the Google load balancing health check infrastructure and the health check state will be aligned with the readiness probe state. This is done using a component, called Transparent Health Checker, which runs on every node that will serve the Pod's health status.\n\nCloud Service Mesh configures Health check traffic sent from the health check infrastructure source ranges to be sent to a reserved port (7877). This traffic is redirected to the transparent health check server locally on the node. The server responds with a health status matching the current state of the Kubernetes Pod readiness. The traffic flow to Kubernetes Pods is controlled based on Ready status set on each Pod. You can optionally control the \"Ready\" status with readiness probe and readiness gates values. The transparent health-check will report the status based on a logical operator AND of all Kubernetes conditions.\n\nYou can configure Kubernetes probes, readiness gates and other checks that influence the Kubernetes Pod readiness status.\n\nConfigure readiness probes for a HTTP service (Optional)\n--------------------------------------------------------\n\nYou can optionally add this section to the Deployment for the whereami service [HTTP Service Setup](/service-mesh/docs/gateway/set-up-envoy-mesh#set_up_the_service). \n\n ...\n spec:\n containers:\n - name: whereami\n image: us-docker.pkg.dev/google-samples/containers/gke/whereami:v1\n ports:\n - containerPort: 8080\n readinessProbe:\n initialDelaySeconds: 1\n periodSeconds: 2\n timeoutSeconds: 1\n successThreshold: 1\n failureThreshold: 1\n httpGet:\n host:\n scheme: HTTP\n path: /\n port: 8080\n initialDelaySeconds: 5\n periodSeconds: 5\n\nConfigure readiness probes for a gRPC service (Optional)\n--------------------------------------------------------\n\nYou can optionally add this section to the Deployment for psm-grpc-server [gRPC service setup](/service-mesh/docs/gateway/proxyless-grpc-mesh#set_up_the_service). \n\n ...\n spec:\n containers:\n - name: psm-grpc-server\n image: ${IMAGE_NAME}\n imagePullPolicy: Always\n args:\n ${ARGS}\n ports:\n - containerPort: 50051\n readinessProbe:\n initialDelaySeconds: 1\n periodSeconds: 2\n timeoutSeconds: 1\n successThreshold: 1\n failureThreshold: 1\n grpc:\n port: 50051"]]