33  How-to create an GitLab Agent for Kubernetes

Note

33.1 Create configuration file

Create the file .gitlab/agents/kubernetes/config.yaml and add

ci_access:
  projects:
    - id: ilcm/orc2

33.2 Register

Important

Make sure that Operations is enabled in your project under Settings > General > Visibility, project features, permissions.

Screenshot of Settings > General > Visibility, project features, permissions.

Point your web browser to the project’s Infrastructure > Kubernetes clusters.

Screenshot of Infrastructure > Kubernetes clusters.

Click in Connect a cluster.

Screenshot of Connect a Kubernetes cluster dialog window.

Select the agent from the dropdown menu and click Register.

Follow the instructions provided by GitLab.

Screenshot of Agent access token dialog window.

Refresh the page to verify that the agent is connected.

Screenshot of GitLab showing all the agents in a project.