To connect clusters to GitLab, use the GitLab agent.
The certificate-based Kubernetes integration with GitLab is deprecated. It had the following issues:
- There were security issues as it required direct access to the Kubernetes API by GitLab.
- The configuration options weren’t flexible.
- The integration was flaky.
- Users were constantly reporting issues with features based on this model.
For this reason, we started to build features based on a new model, the GitLab agent. Maintaining both methods in parallel caused a lot of confusion and significantly increased the complexity to use, develop, maintain, and document them. For this reason, we decided to deprecate them to focus on the new model.
Certificate-based features will continue to receive security and critical fixes, and features built on top of it will continue to work with the supported Kubernetes versions. The removal of these features from GitLab is not scheduled yet. Follow this epic for updates.
You can find technical information about why we moved away from cluster certificates into the GitLab agent model on the agent’s blueprint documentation.
If you need more time to migrate to GitLab agent, you can enable the feature flag
certificate_based_clusters, which was introduced in GitLab 15.0.
This feature flag re-enables the certificate-based Kubernetes integration.
- Connect an existing cluster through cluster certificates
- Access controls
- GitLab-managed clusters
- Deploy applications through certificate-based connection
- Cluster Management Project
- Cluster integrations
- Cluster cost management
- Cluster environments
- Show Canary Ingress deployments on deploy boards
- Deploy Boards
- Clusters health
- Web terminals
The agent is always configured in a single GitLab project and you can expose the cluster connection to other projects and groups to access it from GitLab CI/CD. By doing so, you are granting these projects and groups access to the same cluster, which is similar to group-level clusters’ use case.