bare in mind that I'm new to Kubernetes.
I'm trying to integrate our existing K8 cluster in GitLab. I have added the cluster to gitlab and I can see projects are fetched. However under Health tab I see that I need to install Prometheus.
On the cluster this is the error I get
[user]$ kubectl describe pvc prometheus-prometheus-server -ngitlab-managed-apps
Name: prometheus-prometheus-server
Namespace: gitlab-managed-apps
StorageClass:
Status: Pending
Volume:
Labels: app=prometheus
chart=prometheus-9.5.2
component=server
heritage=Tiller
release=prometheus
Annotations: <none>
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Mounted By: prometheus-prometheus-server-78bdf8f5b7-dkctg
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal FailedBinding 6s (x2 over 6s) persistentvolume-controller no persistent volumes available for this claim and no storage class is set
I tried both, specifying storage class and adding persistent volume to no avail, the error remains the same. I can't understand why the volume is not claimed.
This is how the added volume looks like
[user]$ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
prometheus-prometheus-server 2Gi RWX Retain Available manual 17m
kubectl describe pv prometheus-prometheus-server
Name: prometheus-prometheus-server
Labels: app=prometheus
chart=prometheus-9.5.2
component=server
heritage=Tiller
release=prometheus
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"PersistentVolume","metadata":{"annotations":{},"labels":{"app":"prometheus","chart":"prometheus-9.5.2","compone...
Finalizers: [kubernetes.io/pv-protection]
StorageClass: manual
Status: Available
Claim:
Reclaim Policy: Retain
Access Modes: RWX
VolumeMode: Filesystem
Capacity: 2Gi
Node Affinity: <none>
Message:
Source:
Type: HostPath (bare host directory volume)
Path: /var/prometheus-server
HostPathType:
Events: <none>