title: GKE Ingress health check failed on ingress but succeed on Loadbalncer
body: <p>On GKE, I have a deployment working fine, status running and health checks fine:
  here it is:</p>
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: erp-app
    labels:
      app: erp-app
      switch: app
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: erp-app
    template:
      metadata:
        labels:
          app: erp-app
      spec:
        containers:
          - name: erp-container
            # Extract this from Google Container Registry
            image: gcr.io/project/project:latest
            imagePullPolicy: Always
            env:
            ports:
              - containerPort: 8080
            livenessProbe:
              failureThreshold: 10
              httpGet:
                path: /
                port: 8080
                scheme: HTTP
              initialDelaySeconds: 150
              periodSeconds: 30
              successThreshold: 1
              timeoutSeconds: 30
            readinessProbe:
              failureThreshold: 10
              httpGet:
                path: /
                port: 8080
                scheme: HTTP
              initialDelaySeconds: 150
              periodSeconds: 30
              successThreshold: 1
              timeoutSeconds: 20
  </code></pre>
  <p>Then, I created a service to map ports 8080 to 80</p>
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
      labels:
          app: erp-app
      name: erp-loadbalancer
  spec:
      ports:
          - port: 80
            protocol: TCP
            targetPort: 8080
      selector:
          app: erp-app
      sessionAffinity: None
      type: NodePort
  </code></pre>
  <p>And then, GKE Ingress</p>
  <pre><code>apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
      name: app-ingress
      annotations:
          networking.gke.io/managed-certificates: managed-cert
          kubernetes.io/ingress.class: &quot;gce&quot;
  spec:
      defaultBackend:
          service:
              name: erp-loadbalancer
              port:
                  number: 80
  </code></pre>
  <p>Things is, ingress does not want to work because backend healthcheck does not pass. If I check health check on gcloud (<a href="https://console.cloud.google.com/compute/healthChecks" rel="nofollow noreferrer">https://console.cloud.google.com/compute/healthChecks</a>) I have created for http port 80 on / (on this path, app is serving a 200)
  If I force it to be tcp, then the health check pass. But google automatically switch it back to http, which leads to a 404.</p>
  <p>My question here would be: what's wrong in my configuration for my server to be available with an external loadbalancer and not available when using an ingress ? (backend unhealthy state)</p>