Gitlab Agent not working across projects

Replace this template with your information

Describe your question in as much detail as possible:

  • What are you seeing, and how does that differ from what you expect to see?
    My usecase is that I want to have one agent only to run pipelines for all my projects. The hierrachy is GROUP > SUBGROUP[1…n] > projects. I have placed my config.yaml in group/subgroup1/config_repo. My .gitlab-ci.yaml is placed in group/subgroup1/my_repo

I registered the Gitlab agent successfully in the project group/subgroup1/config_repo and I can see it accepted the configurations.

I followed the official documentation for authorizing the agent to work with another project and met the only condition I could see, i.e.

“The Kubernetes projects must be in the same group hierarchy as the project where the agent’s configuration is.”

When I run the pipeline in group/subgroup1/my_repo, it returns this error.

But when I register an agent in the repo, it works as expected. Not sure what am doing wrong.

Also, am I supposed to register runners when I am using an agent?

  • What version are you on? Are you using self-managed or

  • Add the CI configuration from .gitlab-ci.yml and other configuration if relevant (e.g. docker-compose.yml)


    name: bitnami/kubectl:latest
    entrypoint: [""]
  - kubectl config get-contexts
  - kubectl config use-context group/subgroup1/config_repo:my_agent
  - kubectl get pods -A 


  # This agent is accessible from CI jobs in projects in these groups
  - id: oltranz-team/notification-domain/slackbot
    level: debug
  • What troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?
  1. GitLab Kubernetes Agent CI tunnel at the group level - demo - YouTube
  2. Using a GitLab CI/CD workflow for Kubernetes | GitLab

cc: @dnsmichi please assist if possible

Can I get some assistance. Issue still unresolved

I’m having the same issue where I cannot access an agent from another project