2020-09-17 14:10:12 -04:00
---
stage: Configure
group: Configure
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-09-17 14:10:12 -04:00
---
2022-02-04 19:16:10 -05:00
# Connecting a Kubernetes cluster with GitLab
2020-09-17 20:09:39 -04:00
2021-12-17 19:14:00 -05:00
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/223061) in GitLab 13.4.
2021-10-19 14:13:24 -04:00
> - Support for `grpcs` [introduced](https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/issues/7) in GitLab 13.6.
2022-02-21 19:14:20 -05:00
> - Agent server [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/300960) on GitLab.com under `wss://kas.gitlab.com` through an Early Adopter Program in GitLab 13.10.
2022-03-24 17:08:50 -04:00
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/3834) in GitLab 13.11, the GitLab agent became available on GitLab.com.
2021-12-17 19:14:00 -05:00
> - [Moved](https://gitlab.com/groups/gitlab-org/-/epics/6290) from GitLab Premium to GitLab Free in 14.5.
2022-02-09 13:16:19 -05:00
> - [Renamed](https://gitlab.com/groups/gitlab-org/-/epics/7167) from "GitLab Kubernetes Agent" to "GitLab agent for Kubernetes" in GitLab 14.6.
2020-09-17 14:10:12 -04:00
2022-02-09 13:16:19 -05:00
You can connect your Kubernetes cluster with GitLab to deploy, manage,
2022-03-24 08:07:26 -04:00
and monitor your cloud-native solutions.
2022-03-04 13:20:01 -05:00
To connect a Kubernetes cluster to GitLab, you must first [install an agent in your cluster ](install/index.md ).
The agent runs in the cluster, and you can use it to:
- Communicate with a cluster, which is behind a firewall or NAT.
- Access API endpoints in a cluster in real time.
- Push information about events happening in the cluster.
- Enable a cache of Kubernetes objects, which are kept up-to-date with very low latency.
For more details about the agent's purpose and architecture, see the [architecture documentation ](https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/master/doc/architecture.md ).
## Workflows
You can choose from two primary workflows.
2020-09-17 14:10:12 -04:00
2022-02-17 13:19:40 -05:00
In a [**GitOps** workflow ](gitops.md ), you keep your Kubernetes manifests in GitLab. You install a GitLab agent in your cluster, and
2022-02-09 13:16:19 -05:00
any time you update your manifests, the agent updates the cluster. This workflow is fully driven with Git and is considered pull-based,
because the cluster is pulling updates from your GitLab repository.
2020-09-17 14:10:12 -04:00
2022-02-17 13:19:40 -05:00
In a [**CI/CD** workflow ](ci_cd_tunnel.md ), you use GitLab CI/CD to query and update your cluster by using the Kubernetes API.
2022-02-09 13:16:19 -05:00
This workflow is considered push-based, because GitLab is pushing requests from GitLab CI/CD to your cluster.
2020-09-17 14:10:12 -04:00
2022-02-04 19:16:10 -05:00
## Supported cluster versions
2022-02-09 13:16:19 -05:00
GitLab supports the following Kubernetes versions. You can upgrade your
Kubernetes version to a supported version at any time:
2022-02-04 19:16:10 -05:00
- 1.20 (support ends on July 22, 2022)
- 1.19 (support ends on February 22, 2022)
2022-02-09 13:16:19 -05:00
GitLab supports at least two production-ready Kubernetes minor
versions at any given time. GitLab regularly reviews the supported versions and
provides a three-month deprecation period before removing support for a specific
version. The list of supported versions is based on:
- The versions supported by major managed Kubernetes providers.
- The versions [supported by the Kubernetes community ](https://kubernetes.io/releases/version-skew-policy/#supported-versions ).
[This epic ](https://gitlab.com/groups/gitlab-org/-/epics/4827 ) tracks support for other Kubernetes versions.
2022-02-04 19:16:10 -05:00
2022-02-09 13:16:19 -05:00
Some GitLab features might work on versions not listed here.
2022-02-04 19:16:10 -05:00
2022-02-17 13:19:40 -05:00
## Migrate to the agent from the legacy certificate-based integration
2021-10-19 14:13:24 -04:00
2022-02-17 13:19:40 -05:00
Read about how to [migrate to the agent for Kubernetes ](../../infrastructure/clusters/migrate_to_gitlab_agent.md ) from the certificate-based integration.
2022-01-13 10:14:46 -05:00
2022-02-03 13:17:34 -05:00
## Related topics
2020-11-06 19:08:58 -05:00
2022-02-17 13:19:40 -05:00
- [GitOps workflow ](gitops.md )
- [GitLab CI/CD workflow ](ci_cd_tunnel.md )
- [Install the agent ](install/index.md )
- [Work with the agent ](repository.md )
2022-02-03 13:17:34 -05:00
- [Troubleshooting ](troubleshooting.md )
2022-02-17 13:19:40 -05:00
- [Contribute to the agent's development ](https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/tree/master/doc )