Kubernetes agent sharing between groups

I’m trying to use kubernetes agent on my projects on gitlab.com
I’ve setup a .gitlab/agents/vps/config.yaml with this content on the project fmnd/infra-ansible

ci_access:
  groups:
    - id: fmnd

I’ve installed the kubernetes agent and it’s seems it’s connected on the UI:

Now, i go to another project into the same group : fmnd/eglise

And i put this into the .gitlab-ci.yml

 deploy:
   image:
     name: bitnami/kubectl:latest
     entrypoint: [""]
   script:
   - kubectl config get-contexts

Result of the deploy job :

$ kubectl config get-contexts
CURRENT   NAME   CLUSTER   AUTHINFO   NAMESPACE
Cleaning up project directory and file based variables 00:01
Job succeeded

I would expect at least a context in the list.
Am i doing something wrong?

I think i’ve my answer, my two projects are not inside a group, but inside a user namespace

Hi Hufon, I am facing the exact same question. Configured an agent and connected into in one project, now added kubectl config get-contexts in another project within the same group, yet is is empty… did you manage to resolve that issue? Thanks! Thomas

I’m have the same problem. I try to find a way to create a Kubernetes (infrastructure) to a group instead of project but I couldn’t find the option.