Skip to content

Kubernetes integration usage with custom Ingress

After a Kubernetes Integration to GitLab and following deprecation, I created a Cluster Management project importing this project, ran a pipeline for prometheus installation. My target: be able to display cluster health in the corresponding tab in my cluster project (here kubernetes instance cluster).

I only try to install prometheus using the pipeline, setting prometheus to true. Installation was missing PersistentVolume, I configured it, and finally:

NAME                                          READY STATUS  RESTARTS AGE
prometheus-kube-state-metrics-f795f46c-j695k  1/1   Running 0        6d9h
prometheus-prometheus-server-866d9665c6-xvnqc 2/2   Running 4        5d6h
runner-gitlab-runner-79cf7bcb8b-hc2dq         1/1   Running 0        6d10h

But then, instead of installing nginx-ingress, I want to set up a LoadBalancer handling SSL termination and accessing a NodePort I have configured on the prometheus-server.

NAME                            TYPE        CLUSTER-IP       EXTERNAL-IP PORT(S)         AGE
prometheus-kube-state-metrics   ClusterIP   None             <none>      80/TCP,81/TCP   6d9h
prometheus-prometheus-extserver NodePort    10.103.76.141    <none>      9090:30000/TCP  29m
prometheus-prometheus-server    ClusterIP   10.109.153.73    <none>      80/TCP          6d9h

The architecture is simple:

graph LR

GITLAB[GitLab]

subgraph Cloud project *.one.two.example.com
  LB[Reverse Proxy]

subgraph Kubernetes Cluster
  PROM[Prometheus Pod]
end

end

GITLAB --> |https:443|LB --> |30000|PROM

Accessing the URL works great on my own, so I feel my configuration sounds equivalent to the one-click installation. I have an SSL termination with wildcard. *.one.two.example.com for instance. I have opened port 443 for prom.one.two.example.com, prometheus.one.two.example.com to the NodePort, and indicated base domain of my cluster in GitLab to one.two.example.com.

But how can I say to the GitLab integration which URL to access to monitor my cluster?

Health tab of Kubernetes cluster still indicate In order to view the health of your cluster, you must first install Prometheus in the Applications tab. and I cannot see any attempt to connect my setup.