<p>I'm working on a deployment in GKE that is my first one, so I'm pretty new to the concepts, but I understand where they're going with the tools, just need the experience to be confident.</p>
<p>First, I have a cluster that has about five services, two of which I want to expose via external load balancer. I've defined an annotation for Gcloud to set these up under load balancing, and that seems to be working, I've also setup an annotation to setup a network endpoint groups for the services. Here's how one is configured as in the deployment and service manifests.</p>
<pre><code>---
#api-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert -f ./docker-compose.yml
    kompose.version: 1.21.0 ()
  creationTimestamp: null
  labels:
    io.kompose.service: api
  name: api
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: api
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        kompose.cmd: kompose convert -f ./docker-compose.yml
        kompose.version: 1.21.0 ()
      creationTimestamp: null
      labels:
        io.kompose.service: api
    spec:
      containers:
      - args:
        - bash
        - -c
        - node src/server.js
        env:
        - name: NODE_ENV
          value: production
        - name: TZ
          value: America/New_York
        image: gcr.io/&lt;PROJECT_ID&gt;/api
        imagePullPolicy: Always
        name: api
        ports:
        - containerPort: 8087
        resources: {}
      restartPolicy: Always
      serviceAccountName: &quot;&quot;
status: {}

---
#api-service.yaml
apiVersion: v1
kind: Service
metadata:
  annotations:
    cloud.google.com/load-balancer-type: &quot;Internal&quot;
    cloud.google.com/neg: '{&quot;ingress&quot;: true}'
  creationTimestamp: null
  labels:
    io.kompose.service: api
  name: api
spec:
  type: LoadBalancer
  ports:
  - name: &quot;8087&quot;
    port: 8087
    targetPort: 8087
status:
  loadBalancer: {}


</code></pre>
<p>I think I may be missing some kind of configuration here, but I'm unsure.</p>
<p>I've also seen where I can define Liveness checks in the yaml by adding</p>
<pre><code>livenessProbe:
      httpGet:
        path: /healthz
        port: 8080
</code></pre>
<p>I also have my ingress configured like this:</p>
<pre><code>---
# master-ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: master-application-ingress
  annotations:
    ingress.kubernetes.io/secure-backends: &quot;true&quot;
spec:
  rules:
  - http:
      paths:
      - path: /api
        backend:
          serviceName: api
          servicePort: 8087
  - http:
      paths:
      - path: /ui
        backend:
          serviceName: ui
          servicePort: 80
</code></pre>
<p>and I've seen it where it just needs the port, for TCP checks, but I've already defined these in my application, and in the load balancer. I guess I want to know where I should be defining these checks.</p>
<p>Also, I have an issue with the NEG's created by the annotation being empty, or is this normal with manifest created NEG's?</p>

<p>The health check is created based on your <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/ingress#health_checks" rel="nofollow noreferrer">readinessProbe</a>, not livenessProbe. Make sure to have a readinessProbe configured in your pod spec before creating the ingress resource.</p>
<p>As for the empty NEG, this might be due to a mismatch of the Health Check. The NEG will rely on the readiness gate feature (<a href="https://cloud.google.com/kubernetes-engine/docs/concepts/container-native-load-balancing#pod_readiness" rel="nofollow noreferrer">explained here</a>), since you only have the livenessProbe defined, it is entirely possible the health check is misconfigured and thus failing.</p>
<p>You should also have an internal IP for the internal LB you created, can you reach the pods that way? If both are failing, the Health Check is likely the issue since the NEG is not adding pods to the group that it sees as not ready</p>
