gitlab-org--gitlab-foss/doc/user/clusters/integrations.md

2.8 KiB

stage group info
Configure Configure 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

Cluster integrations (FREE)

GitLab provides several ways to integrate applications to your Kubernetes cluster.

To enable cluster integrations, first add a Kubernetes cluster to a GitLab project or group.

Prometheus cluster integration

Introduced in GitLab 13.11.

You can integrate your Kubernetes cluster with Prometheus for monitoring key metrics of your apps directly from the GitLab UI.

Alerts are not currently supported.

Once enabled, you will see metrics from services available in the metrics library.

Prerequisites:

To benefit from this integration, you must have Prometheus installed in your cluster with the following requirements:

  1. Prometheus must be installed inside the gitlab-managed-apps namespace.
  2. The Service resource for Prometheus must be named prometheus-prometheus-server.

You can use the following commands to install Prometheus to meet the requirements for cluster integrations:

# Create the require Kubernetes namespace
kubectl create ns gitlab-managed-apps

# Download Helm chart values that is compatible with the requirements above.
# You should substitute the tag that corresponds to the GitLab version in the url
# - https://gitlab.com/gitlab-org/gitlab/-/raw/<tag>/vendor/prometheus/values.yaml
#
wget https://gitlab.com/gitlab-org/gitlab/-/raw/v13.9.0-ee/vendor/prometheus/values.yaml

# Add the Prometheus community helm repo
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts

# Install Prometheus
helm install prometheus prometheus-community/prometheus -n gitlab-managed-apps --values values.yaml

Alternatively, you can use your preferred installation method to install Prometheus as long as you meet the requirements above.

Enable Prometheus integration for your cluster

To enable the Prometheus integration for your cluster:

  1. Go to the cluster's page:
  2. Select the Integrations tab.
  3. Check the Enable Prometheus integration checkbox.
  4. Click Save changes.
  5. Go to the Health tab to see your cluster's metrics.