Skip to content

health check for gRPC containers #488

Open
@ganesh-dataminr

Description

@ganesh-dataminr

Feature request

Currently it looks like there is no equivalent for /health in the gRPC containers. Could a kubernetes compatible health probe be added?

Motivation

Currently, I am writing custom commands to enable the gRPC container within kubernetes. Enabling this makes the gRPC docker container more complete with ootb kubernetes deployment capabilities.

Your contribution

I am not a rust developer but happy to make a PR with some guidance.

Activity

happysansam

happysansam commented on May 14, 2025

@happysansam

Check this out
https://github.com/grpc-ecosystem/grpc-health-probe

FROM ghcr.io/huggingface/text-embeddings-inference:v1.6

# Install the required packages
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    wget && \
    rm -rf /var/lib/apt/lists/*

# Install the grpc_health_probe tool
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.13 && \
    wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
    chmod +x /bin/grpc_health_probe
readinessProbe:
  exec:
    command: ["/bin/grpc-health-probe", "-addr=:80"]
  initialDelaySeconds: 3
  periodSeconds: 5

livenessProbe:
  exec:
    command: ["/bin/grpc-health-probe", "-addr=:80"]
  initialDelaySeconds: 10
  periodSeconds: 10
omBratteng

omBratteng commented on Jun 10, 2025

@omBratteng

Kubernetes has native support for gRPC healthcheck (1.27+), so yo can just add this to the deployments

    livenessProbe:
      grpc:
        port: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      health check for gRPC containers · Issue #488 · huggingface/text-embeddings-inference