<p>I have the following deployment running in Google Cloud Platform (GCP):</p>

<pre><code>    kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: mybackend
  labels:
    app: backendweb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: backendweb
      tier: web
  template:
    metadata:
      labels:
        app: backendweb
        tier: web
    spec:
      containers:
        - name: mybackend
          image: eu.gcr.io/teststuff/backend:latest
          ports:
            - containerPort: 8081
</code></pre>

<p>This uses the following service:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: mybackend
  labels:
    app: backendweb
spec:
  type: NodePort
  selector:
    app: backendweb
    tier: web
  ports:
    - port: 8081
      targetPort: 8081
</code></pre>

<p>Which uses this ingress:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress
  annotations:
    kubernetes.io/ingress.global-static-ip-name: backend-ip
  labels:
    app: backendweb
spec:
  backend:
    serviceName: mybackend
    servicePort: 8081
</code></pre>

<p>When I spin all this up in Google Cloud Platform however, I get the following error message on my ingress:</p>

<pre><code>All backend services are in UNHEALTHY state
</code></pre>

<p>I've looked through my pod logs with no indication about the problem.  Grateful for any advice!</p>

<p>Most likely this problem is caused by not returning 200 on route <code>'/'</code> for your pod. Please check your pod configurations. If you don't want to return 200 at route <code>'/'</code>, you could add a readiness rule for health check like this:</p>

<pre><code>readinessProbe:
    httpGet:
        path: /healthz
        port: 80
    initialDelaySeconds: 5
    periodSeconds: 5
</code></pre>
