
11/18/2021 · Viktor Nagy
What this post added
This post details the technical steps and considerations for connecting a Kubernetes cluster to GitLab using the GitLab Agent for Kubernetes. It outlines the prerequisites, different connection methods (manual KUBECONTEXT, third-party tools, legacy integration, and the recommended Agent approach), and the internal workings of the Agent (`agentk` and `kas`). It provides detailed instructions for creating the agent configuration file (`config.yaml`), registering the agent via the GitLab UI or Terraform (including Terraform module usage and CI/CD integration), and installing `agentk` using `kpt` for advanced customization. The post also discusses agent deployment strategies for larger setups, recommending separate agents per environment or squad for better management and security.