<p>I have Gitlab Kubernetes integration in my <code>Project 1</code> and I am able to access the <code>kube-context</code> within that project's pipelines without any issues.</p>
<p>I have another project, <code>Project 2</code> where I want to use the same cluster that I integrated in my <code>Project 1</code>.</p>
<p>This i my agent config file:</p>
<pre><code># .gitlab/agents/my-agent/config.yaml

ci_access:
  projects:
    - id: group/project-2
</code></pre>
<p>When I try to add a Kubernetes cluster in my <code>Project 2</code>, I am expecting to see the cluster name that I set up for <code>Project 1</code> in the dropdown, but I don't see it:</p>
<p><a href="https://i.stack.imgur.com/LYZfr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LYZfr.png" alt="gitlab-agent" /></a></p>

HelmBurger
<p><a href="https://about.gitlab.com/releases/2022/12/22/gitlab-15-7-released/#share-cicd-access-to-the-agent-within-a-personal-namespace" rel="nofollow noreferrer">GitLab 15.7</a> (December 2022) suggests an alternative approach, which does not involve creating a new agent per project</p>
<blockquote>
<h2>Share CI/CD access to the agent within a personal namespace</h2>
<p>The GitLab agent for Kubernetes provides a more secure solution for managing your clusters with GitLab CI/CD.
You can use a single agent with multiple projects and groups by sharing access
to the agent connection. In previous releases, you could not share access with personal
namespaces. This release adds support for CI/CD connection sharing to personal namespaces.
You can now use a single agent from any of the projects under your personal namespace.</p>
<p><a href="https://i.stack.imgur.com/lGha6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lGha6.png" alt="https://about.gitlab.com/images/15_7/configure-allow-agent-cicd-access-sharing-within-a-personal-namesp.png -- Share CI/CD access to the agent within a personal namespace" /></a></p>
<p>See <a href="https://docs.gitlab.com/ee/user/clusters/agent/ci_cd_workflow.html#authorize-the-agent" rel="nofollow noreferrer">Documentation</a> and <a href="https://gitlab.com/gitlab-org/gitlab/-/issues/356831" rel="nofollow noreferrer">Issue</a>.</p>
</blockquote>
<p>That means from a single agent, you should be able to access an agent connection from multiple projects (personal namespace or not).</p>
