I have Gitlab Kubernetes integration in my Project 1
and I am able to access the kube-context
within that project's pipelines without any issues.
I have another project, Project 2
where I want to use the same cluster that I integrated in my Project 1
.
This i my agent config file:
# .gitlab/agents/my-agent/config.yaml
ci_access:
projects:
- id: group/project-2
When I try to add a Kubernetes cluster in my Project 2
, I am expecting to see the cluster name that I set up for Project 1
in the dropdown, but I don't see it:
CodePudding user response:
Have you ensured that the agent configuration file config.yaml
is present in your project2
at the specified directory?
If you have, you should be able to choose the agent from the list and setup Gitlab with it. Having the configuration file in both projects is necessary when you configure multiple projects to use the same k8s cluster.