Skip to content

Files

Latest commit

34fb0a7 · Dec 12, 2024

History

History

kube-prometheus

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Sep 8, 2023
Sep 8, 2023
Dec 12, 2024
Sep 8, 2023
Oct 20, 2023
Oct 20, 2023
Sep 8, 2023
Sep 17, 2024

Kube Prometheus Example

These commands deploy the kube-prometheus stack with modifications to kube-state-metrics that add the custom metrics for gateway-api. It also creates the example dashboards in Grafana.

First, apply the various monitoring CustomResourceDefinitions, giving them time to reconcile fully:

kubectl apply --server-side -f ./bundle_crd.yaml

Then apply the full set of monitoring stack resources:

kubectl apply -f ./bundle.yaml

To access the dashboards in Grafana, use the port-forward command:

kubectl wait --timeout=5m -n monitoring deployment/grafana --for=condition=Available
kubectl -n monitoring port-forward service/grafana 3000:3000 &

Then navigate to http://localhost:3000 The Gateway API State dashboards will be available in the 'Default' folder.

To access the prometheus UI, use this port-forward command:

kubectl -n monitoring rollout status --watch --timeout=5m statefulset/prometheus-k8s
kubectl -n monitoring port-forward service/prometheus-k8s 9090:9090 &

Then navigate to http://localhost:9090 You should see some example Gateway API alerts in the 'Alerts' tab.