From f0d2eac04ff677f0f04e4991aa7f945cc175efed Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Thu, 24 Jun 2021 11:29:58 +0200 Subject: [ANSIBLE] Create a NodePort type service for Grafana dashboard This will allow accessing Grafana UI on controlplane public port. Change-Id: Ic3c2f22f36616fe636c966d962b9e503ef56c735 Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski --- ansible/roles/kube-prometheus-stack/defaults/main.yml | 8 ++++++++ docs/InstallGuide.rst | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/ansible/roles/kube-prometheus-stack/defaults/main.yml b/ansible/roles/kube-prometheus-stack/defaults/main.yml index 74d6564a..6b25a2e5 100644 --- a/ansible/roles/kube-prometheus-stack/defaults/main.yml +++ b/ansible/roles/kube-prometheus-stack/defaults/main.yml @@ -27,6 +27,14 @@ kube_prometheus_stack: accessModes: - ReadWriteOnce size: 4Gi + service: + enabled: true + type: NodePort + port: 80 + targetPort: 3000 + annotations: {} + labels: {} + portName: service prometheus: prometheusSpec: scrapeInterval: 60s diff --git a/docs/InstallGuide.rst b/docs/InstallGuide.rst index 32d8ef04..30f5c404 100644 --- a/docs/InstallGuide.rst +++ b/docs/InstallGuide.rst @@ -662,6 +662,13 @@ In the left pane navigate to *Dashboards -> Manage* to see the various pre-defin .. image:: images/grafana-dashboards.png :alt: Grafana dashboards +Alternative way of accessing the UI is by leveraging the NodePort type service which exposes Grafana UI on the Infra host public port directly. To do so get the port number first:: + + kubectl -n kube-prometheus get service/kube-prometheus-stack-grafana -o custom-columns=PORTS:.spec.ports[].nodePort + +Then navigate to http://: to access the UI. + + Caveats ~~~~~~~ -- cgit 1.2.3-korg