diff --git a/helm/greeter/values.yaml b/helm/greeter/values.yaml index a35d854..989d6c7 100644 --- a/helm/greeter/values.yaml +++ b/helm/greeter/values.yaml @@ -88,13 +88,11 @@ resources: {} # This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ livenessProbe: - httpGet: - path: / - port: http + grpc: + port: 50051 readinessProbe: - httpGet: - path: / - port: http + grpc: + port: 50051 #This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ autoscaling: diff --git a/main.go b/main.go index 0fabd75..0324378 100644 --- a/main.go +++ b/main.go @@ -27,6 +27,8 @@ import ( "google.golang.org/grpc" pb "google.golang.org/grpc/examples/helloworld/helloworld" + "google.golang.org/grpc/health" + healthgrpc "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/reflection" ) @@ -51,6 +53,8 @@ func main() { log.Fatalf("failed to listen: %v", err) } s := grpc.NewServer() + hc := health.NewServer() + healthgrpc.RegisterHealthServer(s, hc) pb.RegisterGreeterServer(s, &server{}) reflection.Register(s) if err := s.Serve(lis); err != nil {