GitLab provides several ways to integrate applications to your Kubernetes cluster.
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.
To benefit from this integration, you must have Prometheus installed in your cluster with the following requirements:
- Prometheus must be installed inside the
Serviceresource for Prometheus must be named
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.
To enable the Prometheus integration for your cluster:
- Go to the cluster’s page:
- Select the Integrations tab.
- Check the Enable Prometheus integration checkbox.
- Click Save changes.
- Go to the Health tab to see your cluster’s metrics.