title: GCE ingress health checks failing on kubernetes
body: <p>I am trying to run a bitcoin node on kubernetes. My stateful set is as follows:</p>
  
  <pre><code>apiVersion: apps/v1
  kind: StatefulSet
  metadata:
    name: bitcoin-stateful
    namespace: dev
  spec:
    serviceName: bitcoinrpc-dev-service
    replicas: 1
    selector:
      matchLabels:
        app: bitcoin-node
    template:
      metadata:
        labels:
          app: bitcoin-node
      spec:
        containers:
        - name: bitcoin-node-mainnet
          image: myimage:v0.13.2-addrindex
          imagePullPolicy: Always
          ports:
          - containerPort: 8332 
          volumeMounts:
          - name: bitcoin-chaindata
            mountPath: /root/.bitcoin
          livenessProbe:
            exec:
              command:
              -  bitcoin-cli
              -  getinfo
            initialDelaySeconds: 60 #wait this period after staring fist time
            periodSeconds: 15  # polling interval
            timeoutSeconds: 15    # wish to receive response within this time period
          readinessProbe: 
            exec:
              command:
              -  bitcoin-cli
              -  getinfo
            initialDelaySeconds: 60 #wait this period after staring fist time
            periodSeconds: 15    # polling interval
            timeoutSeconds: 15    # wish to receive response within this time period
          command: ["/bin/bash"]
          args: ["-c","service ntp start &amp;&amp; \
                      bitcoind -printtoconsole -conf=/root/.bitcoin/bitcoin.conf -reindex-chainstate -datadir=/root/.bitcoin/ -daemon=0 -bind=0.0.0.0"]
  </code></pre>
  
  <p>Since, the bitcoin node doesn't serve any http get requests and only can serve post requests, I am trying to use <code>bitcoin-cli</code> command for <code>liveness</code> and <code>readiness probe</code></p>
  
  <p>My service is as follows:</p>
  
  <pre><code>kind: Service
  apiVersion: v1
  metadata:
    name: bitcoinrpc-dev-service
    namespace: dev
  spec:
    selector:
      app: bitcoin-node
    ports:
    - name: mainnet
      protocol: TCP
      port: 80
      targetPort: 8332
  </code></pre>
  
  <p>When I describe the pods, they are running ok and all the health checks seem to be ok.</p>
  
  <p>However, I am also using ingress controller with the following config:</p>
  
  <pre><code>kind: Ingress
  apiVersion: extensions/v1beta1
  metadata:
    name: dev-ingress
    namespace: dev
    annotations:
      kubernetes.io/ingress.class: "gce"
      kubernetes.io/ingress.global-static-ip-name: "dev-ingress"
  spec:
    rules:
          - host: bitcoin.something.net
        http:
          paths:
          - path: /rpc
            backend:
              serviceName: bitcoinrpc-dev-service
              servicePort: 80
  </code></pre>
  
  <p>The health checks on the L7 load balancer seem to be failing. The tests are automatically configured in the following manner.</p>
  
  <p><a href="https://i.stack.imgur.com/qnrFD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qnrFD.png" alt="enter image description here"></a></p>
  
  <p>However, these tests are not the same as the ones configured in the readiness probe. I tried to delete the ingress and recreate however, it still behaves the same way.</p>
  
  <p>I have the following questions:</p>
  
  <pre><code>1. Should I modify/delete this health check manually?
  2. Even if the health check is failing (wrongly configured), since the containers and ingress are up, does it mean that I should be able to access the service through http?
  </code></pre>