gRPC Support
This guide explains how to configure and deploy gRPC services on Runway for Kubernetes (AWS EKS or GCP GKE).
Overview New in v4.18.2
Section titled “Overview ”Runway provides end-to-end gRPC support for services deployed on both GKE and EKS clusters. This includes support for:
- External load balancers with optional Runway managed Cloudflare zone
- Internal load balancers for private gRPC services
Protocol configuration
Section titled “Protocol configuration”To enable gRPC for your service, set the spec.protocol field in your default-values.yaml:
apiVersion: runway/v1kind: RunwayKubernetesServicemetadata: name: example-servicespec: image: "registry.gitlab.com/gitlab-com/gl-infra/platform/runway/example-service:{{ .AppVersion }}" command: ["/bin/grpc-server"] container_port: 50051 protocol: grpc # Enable gRPC protocolHealth checks
Section titled “Health checks”Runway supports gRPC health checks that conform to the standard gRPC Health Checking Protocol. Health checks verify the overall server health and are configured at two levels: Kubernetes probes and load balancer health checks.
Kubernetes probes (startup, liveness, readiness)
Section titled “Kubernetes probes (startup, liveness, readiness)”Configure startup, liveness, and readiness probes for Kubernetes to monitor pod health:
spec: protocol: grpc container_port: 50051
# Health check configuration startup_probe: timeout_seconds: 1 period_seconds: 10 failure_threshold: 10
liveness_probe: timeout_seconds: 1 period_seconds: 10 failure_threshold: 3
readiness_probe: timeout_seconds: 1 period_seconds: 5 failure_threshold: 1Load balancer health checks
Section titled “Load balancer health checks”Runway automatically configures load balancer health checks for gRPC services based on your target runtime.
EKS (ALB Ingress)
Section titled “EKS (ALB Ingress)”For EKS, Runway configures the ALB Ingress health check path to /grpc.health.v1.Health/Check as part of the ALB ingress annotations. This tells the AWS Application Load Balancer to use the standard gRPC health check service for overall server health.
GKE (Gateway API)
Section titled “GKE (Gateway API)”For GKE, Runway leverages the Gateway API’s first-class support for gRPC. The Gateway API implicitly handles gRPC health checks using the standard service name grpc.health.v1.Health.Check defined by the gRPC Health Checking Protocol for overall server health.
Complete example
Section titled “Complete example”Here’s a complete example of a gRPC service configuration for both EKS and GKE:
Default values configuration
Section titled “Default values configuration”apiVersion: runway/v1kind: RunwayKubernetesServicemetadata: name: grpc-examplespec: image: "registry.gitlab.com/gitlab-com/gl-infra/platform/runway/grpc-example:{{ .AppVersion }}" command: ["/bin/grpc-server"] container_port: 50051 protocol: grpc
# Autoscaling configuration scalability: min_instances: 2 max_instances: 10 cpu_utilization: 70
# Resource requirements resources: requests: cpu: "100m" memory: "128Mi" ephemeral-storage: "512Mi" limits: cpu: "500m" memory: "512Mi" ephemeral-storage: "1Gi"
# Health check configuration startup_probe: timeout_seconds: 1 period_seconds: 10 failure_threshold: 10
liveness_probe: timeout_seconds: 1 period_seconds: 10 failure_threshold: 3
readiness_probe: timeout_seconds: 1 period_seconds: 5 failure_threshold: 1
# Prometheus metrics configuration observability: scrape_targets: - "localhost:8082"Refer to the schema for more information on these settings.
EKS deployment configuration
Section titled “EKS deployment configuration”grpc-example-eks: serviceMixins: - "runway-eks.service-mixin"
metadata: labels: gitlab.com/department: eng-infra gitlab.com/department_group: eng-infra-scalability gitlab.com/owner_email_handle: your-handle gitlab.com/product_category: scalabilityGKE deployment configuration
Section titled “GKE deployment configuration”grpc-example-gke: serviceMixins: - "runway-gke.service-mixin"
metadata: labels: gitlab.com/department: eng-infra gitlab.com/department_group: eng-infra-scalability gitlab.com/owner_email_handle: your-handle gitlab.com/product_category: scalabilityTroubleshooting
Section titled “Troubleshooting”Cloudflare considerations
Section titled “Cloudflare considerations”Health checks failing
Section titled “Health checks failing”If your gRPC health checks are failing:
-
Check the health check implementation: Confirm your service implements the gRPC Health Checking Protocol
-
Review logs: Check pod logs for health check errors:
kubectl logs <pod-name> -
Test locally: Use
grpcurlto test health checks locally:Terminal window grpcurl -plaintext localhost:50051 grpc.health.v1.Health/Check
Connection issues
Section titled “Connection issues”If clients cannot connect to your gRPC service:
- Verify HTTPS: gRPC requires HTTP/2 over HTTPS. Ensure your client uses TLS
- Check load balancer: Verify the load balancer is configured for gRPC (check annotations on EKS)
Support
Section titled “Support”For questions or issues with gRPC support, contact the Runway team in #f_runway.