Deploy Boards - "Kubernetes deployment not found". Gitlab managed cluster, and annotations set

Deployment boards are not showing the pods that have been deployed to. Instead I am getting the following error under all environments:

All annotations have been set on the deployment manifest as follows:

apiVersion: apps/v1
kind: Deployment
...
  namespace: __KUBE_NAMESPACE__
  annotations:
        app.gitlab.com/app: __CI_PROJECT_PATH_SLUG__
        app.gitlab.com/env: __CI_ENVIRONMENT_SLUG__
spec:
  ...
  template:
    metadata:
      ...
      annotations:
        app.gitlab.com/app: __CI_PROJECT_PATH_SLUG__
        app.gitlab.com/env: __CI_ENVIRONMENT_SLUG__
    ...

In my deployment pipeline, I am using sed to replace the place holders and I can see this is working when I cat out the final manifest yaml.

Extract from the CI yaml file below for staging:

When I check the deployment using kubectl on the actual cluster, I get the following:

image

The annotations are being set correctly and they mirror the CI variables.

Additionally, when I audit the requests and responses to the API, I can see the request from gitlab being received, and the response sent back from the API:

Request to list the pods from the gitlab sourceIP:

The response back clearly listing one pod as expected, with the correct namespace and annotations:

I am completely out of ideas as to why this is not working correctly. The API is sending all the correct data back to gitlab. Is there something obvious I’m missing?

Hello,

I’m exactly in the same situation as yours. Deployment, pods and replicasets are annotated correctly.
Do you find any solutions to your problem ?

I try to clear the cluster cache via Gitlab, but nothing change…