<p>We recently updated the deployment of a dropwizard service deployed using Docker and Kubernetes.</p>
<p>It was working correctly before, the readiness probe was yielding a healthcheck ping to internal cluster IP getting 200s. Since we updated the healthcheck pings are resulting in a 301 and the service is considered down.</p>
<p>I've noticed that the healthcheck is now <em>Default kubernetes L7 Loadbalancing health check for NEG.</em> (port is set to 80) where it was previously <em>Default kubernetes L7 Loadbalancing health check.</em> where the port was configurable.</p>
<p>The kube file is deployed via CircleCI but the readiness probe is:</p>
<pre><code>
kind: Deployment
metadata:
  name: pes-${CIRCLE_BRANCH}
  namespace: ${GKE_NAMESPACE_NAME}
  annotations:
    reloader.stakater.com/auto: 'true'
spec:
  replicas: 2
  selector:
    matchLabels:
      app: ***
  template:
    metadata:
      labels:
        app: ***
    spec:
      containers:
        - name: ***
          image: ***
          envFrom:
            - configMapRef:
                name: ***
            - secretRef:
                name: ***
          command: ['./gradlew', 'run']
          resources: {}
          ports:
            - name: pes
              containerPort: 5000
          readinessProbe:
            httpGet:
              path: /api/healthcheck
              port: pes
            initialDelaySeconds: 15
            timeoutSeconds: 30

---
apiVersion: v1
kind: Service
metadata:
  name: ***
  namespace: ${GKE_NAMESPACE_NAME}
spec:
  ports:
    - name: pes
      port: 5000
      targetPort: pes
      protocol: TCP
  selector:
    app: ***
  type: LoadBalancer
</code></pre>
<p>Any ideas on how this needs to be configured in GCP?</p>
<p>I have a feeling that the new deployment has changed from legacy health check to non legacy but no idea what else needs to be set up for it to work. Does the kube file handle creating firewall rules or does that need to be done manually?</p>
<p>Reading the docs at <a href="https://cloud.google.com/load-balancing/docs/health-check-concepts?hl=en" rel="nofollow noreferrer">https://cloud.google.com/load-balancing/docs/health-check-concepts?hl=en</a></p>
<p>EDIT:
<strong>Issue is now resolved</strong>. After GKE version was updated it is now creating a NEG healthcheck by default. We disabled this by adding below annotation to service deployment file.</p>
<p>metadata:
annotations:
cloud.google.com/neg: '{&quot;ingress&quot;:false}'</p>

<p>Issue is now resolved. After GKE version was updated it is now creating a NEG healthcheck by default. We disabled this by adding below annotation to service deployment file.</p>
<p><code>metadata: annotations: cloud.google.com/neg: '{&quot;ingress&quot;:false}'</code></p>
