|latest/stable||64||64||31 Jan 2023|
|latest/candidate||64||64||31 Jan 2023|
|latest/beta||64||64||31 Jan 2023|
|latest/edge||67||67||02 Feb 2023|
|1.0/stable||64||64||31 Jan 2023|
|1.0/candidate||64||64||31 Jan 2023|
|1.0/beta||64||64||31 Jan 2023|
|1.0/edge||64||64||31 Jan 2023|
juju deploy grafana-k8s
Grafana Operator (k8s)
This Charmed Operator handles instantiation, scaling, configuration, and Day 2 operations specific to Grafana.
Grafana is an open-source observability toolkit which allows you to query, visualize, alert on, and visualize metrics from mixed datasources in configurable dashboards for observability. This repository contains a Juju Charm for deploying the visualization component of Grafana in a Kubernetes cluster.
The grafana-k8s charm provides an interface which can ingest data from a wide array of data sources, with Prometheus as a common input, then presents that data on configurable dashboards. It is the primary user-facing entrypoint for the Canonical Observability Stack Lite. See the COS Lite Bundle for more information.
The Grafana Operator may be deployed on a Kubernetes Juju model using the command line via:
juju deploy grafana-k8s
At install time, Grafana does not contain any data sources or dashboards, but
Prometheus is commonly used, and is
deployable with Juju. The Grafana Operator may also accept additional
datasources over Juju relations with charms which support the
grafana-datasource interface, such as Loki
juju deploy prometheus-k8s juju relate prometheus-k8s grafana-k8s
The Grafana Operator includes a Charm library which may be used by other Charms
to easily provide datasources. Currently, Prometheus and Loki are tested, with
datasource integration built into those charms, but any Grafana datasource
which does not require the addition of a plugin should be supported. See the
documentation for the
charms.grafana_k8s.v0.grafana_source to learn more.
The Grafana dashboard may be accessed on port
3000 on the IP address of the
This unit and its IP address can be retrieved using the
juju status command.
The default password is randomized at first install, and can be retrieved with:
juju run grafana-k8s/0 get-admin-password # juju >=3 ### JUJU_FEATURES=actions-v2 juju run grafana-k8s/0 get-admin-password # juju 2
View the dashboard in a browser:
juju statusto check the IP of the running Grafana application
- Navigate to
- Log in with the username
admin, and the password you got from the
To manually set the admin password, see the official docs.
Additionally, Grafana can be accessed via the Kubernetes service matching the Juju application name in the namespace matching the Juju model's name.
Integration with other charms/adding external dashboards
The grafana-k8s charm does not support directly relating to Reactive charms
dashboards interface, and it does not support adding dashboards via
an action similar to the Reactive Grafana Charm
as a design goal. For scenarios where Reactive charms which provide dashboards
should be integrated, the COS Proxy charm can
be deployed in a Reactive model, and related to grafana-k8s to provide a
Dashboards which are not bundled as part of a charm can be added to grafana-k8s
with the COS Config Charm, which
can keep a git repository holding your infrastructure-as-code configuration.
COS Config documentation for more information.
To Bundle Dashboards As Part of Your Charm
See the documentation for the
library. Generally, this only requires adding a
to your charm and putting the dashboard templates into a configurable path.
High Availability Grafana
This charm is written to support a high-availability Grafana cluster, but a database relation is required (MySQL or Postgresql).
If HA is not required, there is no need to add a database relation.
NOTE: HA should not be considered for production use.
grafana_datasource - An input for grafana-k8s datasources grafana_dashboard - an input for LZMA compressed base64 encoded dashboard data
This charm is periodically updated to the latest version of the ubuntu/grafana image.
See the Juju SDK docs for guidelines on configuring a development environment and best practices for authoring.