I'm getting the following error when gRPC client on CloudBuild calls gRPC server on GKE.
Hi @yerinu2023,
The error :
@yerinu2023 wrote:
UNAVAILABLE: Connection timeout for priority cloud-internal-istio:cloud_mp_493914004039_1122741154809425496[child1].
indicates an unestablished connection with the gRPC server due to a timeout. You may have to check the timeout settings of gRPC client and server config. It's possible that the default timeouts are too short for your environment. You can also check for the versions of the gRPC libraries on both the client and server side. Make sure you are using the latest versions because sometimes, issues are resolved in newer releases.
In addition, check the instances in your GKE cluster have the correct target tags (allow-health-checks
) applied. This is necessary for the firewall rule to be applied to the instances that need to receive health check traffic.
I want to share the revised version or code. Please refer below:
gcloud compute firewall-rules create grpc-gke-allow-health-checks \
--network=default --action=allow --direction=INGRESS \
--source-ranges=35.191.0.0/16,130.211.0.0/22 \
--target-tags=allow-health-checks \
--rules=tcp:50051-50052
Let me know if this works for you.