Q: How do you implement health checks for a gRPC service in Kubernetes?
Use the gRPC Health Checking Protocol. Your service implements grpc.health.v1.Health/Check. In the probe:
#Kubernetes #Additional Kubernetes Scenarios (Q101-Q200) #L2 #Container Orchestration #K8s
🎙️ Candidate Opening & Architectural Context
""In our production Kubernetes clusters running microservices on EKS/AKS, this was a classic operational challenge. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Production Solution & Architecture
Use the gRPC Health Checking Protocol. Your service implements grpc.health.v1.Health/Check. In the probe: This is available since K8s 1.24. For older versions: use exec probe with grpc_health_probe binary copied into the container.
grpc:
port: 50051
service: "myapp" # optional service name
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Use the gRPC Health Checking Protocol. Your service implements grpc.health.v1.Health/Check. In the probe:."
⚡ 60-Second Elevator Pitch Talking Points
- Immediate Triage: Use the gRPC Health Checking Protocol. Your service implements grpc.health.v1.Health/Check. In
- Run targeted verification commands before modifying configuration.
- Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Advertisement