diff options
author | 2021-06-24 11:29:58 +0200 | |
---|---|---|
committer | 2021-06-29 10:44:39 +0200 | |
commit | f0d2eac04ff677f0f04e4991aa7f945cc175efed (patch) | |
tree | ad13a08670578a8347b2acff6f5df6579d1626d7 | |
parent | a1dcb84b040350a62fda1465b538ab9582dbaa85 (diff) |
[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 <b.grzybowski@partner.samsung.com>
-rw-r--r-- | ansible/roles/kube-prometheus-stack/defaults/main.yml | 8 | ||||
-rw-r--r-- | docs/InstallGuide.rst | 7 |
2 files changed, 15 insertions, 0 deletions
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://<infra IP>:<nodePort> to access the UI. + + Caveats ~~~~~~~ |