Skip to content

Error connecting GitLab Kubernetes Agent to project on GitLab.com

Following the instructions in the GL KA setup, I am able to successfully deploy the agent into my cluster in GKE.

However, in the logs, I see the following:

kubectl logs gitlab-agent-5df4d779b8-c64bn -n gitlab-kubernetes-agent
{"level":"info","time":"2021-11-16T14:43:17.298Z","msg":"Observability endpoint is up","mod_name":"observability","net_network":"tcp","net_address":"[::]:8080"}
{"level":"info","time":"2021-11-16T14:43:17.298Z","msg":"Feature status change","feature_name":"tunnel","feature_status":true}
{"level":"info","time":"2021-11-16T14:43:17.820Z","msg":"Starting synchronization worker","mod_name":"gitops","project_id":"30862246"}
{"level":"error","time":"2021-11-16T14:43:17.960Z","msg":"GetObjectsToSynchronize.Recv failed","mod_name":"gitops","project_id":"30862246","agent_id":2275,"error":"rpc error: code = NotFound desc = project not found","correlation_id":"01FMMK7GPENS3Y5HFNYB3F61JH"}
{"level":"error","time":"2021-11-16T14:43:30.415Z","msg":"GetObjectsToSynchronize.Recv failed","mod_name":"gitops","project_id":"30862246","agent_id":2275,"error":"rpc error: code = NotFound desc = project not found","correlation_id":"01FMMK7WZ2YZ36ARWZJEB8BZ67"}
{"level":"error","time":"2021-11-16T14:43:50.620Z","msg":"GetObjectsToSynchronize.Recv failed","mod_name":"gitops","project_id":"30862246","agent_id":2275,"error":"rpc error: code = NotFound desc = project not found","correlation_id":"01FMMK8GPGH9VCHJ0ZZQP4VQXA"}
{"level":"error","time":"2021-11-16T14:44:42.923Z","msg":"GetObjectsToSynchronize.Recv failed","mod_name":"gitops","project_id":"30862246","agent_id":2275,"error":"rpc error: code = NotFound desc = project not found","correlation_id":"01FMMKA3NTJDQQBVM47THA1M5X"}
{"level":"error","time":"2021-11-16T14:46:41.865Z","msg":"GetObjectsToSynchronize.Recv failed","mod_name":"gitops","project_id":"30862246","agent_id":2275,"error":"rpc error: code = NotFound desc = project not found","correlation_id":"01FMMKDQVRC3ZS6YAX45KJTKA6"}

I have confirmed the project_id and it is correct.

image

If I change it to use the path to the repository, I can see in the logs that the value of project_id changes, but I get the same error.

My gitops config is as follows:

gitops:
  manifest_projects:
  - id: "30862246"
    paths:
    - glob: '**/runner/runner-manifest.yaml'

I have also added an egress rule to allow all out-bound traffic from the VPC just to make sure it's not some network firewall issue. Wondering if there is more detail to be had.

Edited by Charles Chen