<p>I'm trying to use exec probes for readiness and liveness in GKE. This is because it is part of Kubernetes' <a href="https://github.com/grpc-ecosystem/grpc-health-probe" rel="nofollow noreferrer">recommended way to do health checks</a> on gRPC back ends. However when I put the exec probe config into my deployment yaml and apply it, it doesn't take effect in GCP. This is my container yaml:</p>

<pre><code>  - name: rev79-uac-sandbox
    image: gcr.io/rev79-232812/uac:latest
    imagePullPolicy: Always
    ports:
    - containerPort: 3011
    readinessProbe:
      exec:
        command: ["bin/grpc_health_probe", "-addr=:3011"]
      initialDelaySeconds: 5
    livenessProbe:
      exec:
        command: ["bin/grpc_health_probe", "-addr=:3011"]
      initialDelaySeconds: 10
</code></pre>

<p>But still the health checks fail and when I look at the health check configuration in the GCP console I see a plain HTTP health check directed at '/'</p>

<p>When I edit a health check in GCP console there doesn't seem to be any way to choose an exec type. Also I can't see any mention of liveness checks as contrasted to readiness checks even though these are separate Kubernetes things.</p>

<p>Does Google cloud support using exec for health checks?
If so, how do I do it?
If not, how can I health check a gRPC server?</p>

Toby 1 Kenobi
<p><strong>TCP probes</strong> are useful when we are using <strong>gRPC Services</strong> rather than using HTTP probes. </p>

<pre><code>    - containerPort: 3011
    readinessProbe:
      tcpSocket:
        port: 3011
      initialDelaySeconds: 5
      periodSeconds: 10
    livenessProbe:
      tcpSocket:
        port: 3011
      initialDelaySeconds: 15
      periodSeconds: 20
</code></pre>

<blockquote>
  <p>the kubelet will attempt to open a socket to your container on the specified port. If it can establish a connection, the container is considered healthy, if it can’t it is considered a failure
  <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-a-tcp-liveness-probe" rel="nofollow noreferrer">define-a-tcp-liveness-probe</a></p>
</blockquote>
