Skip to main content

cdk8s-grafana

View on Construct Hub

cdk8s-grafana is a library that lets you easily define a Grafana service for your kubernetes cluster along with associated dashboards and datasources, using a high level API.

Usage

To apply the resources generated by this construct, the Grafana operator must be installed on your cluster. See https://operatorhub.io/operator/grafana-operator for full installation instructions.

The following will define a Grafana cluster connected to a Prometheus datasource:

import { Grafana } from 'cdk8s-grafana';

// inside your chart:
const grafana = new Grafana(this, 'my-grafana', {
  defaultDataSource: {
    name: 'Prometheus',
    type: 'prometheus',
    access: 'proxy',
    url: 'http://prometheus-service:9090',
  }
});

Basic aspects of a dashboard can be customized:

const github = grafana.addDatasource('github', ...);
const dashboard = grafana.addDashboard('my-dashboard', {
  title: 'My Dashboard',
  refreshRate: Duration.seconds(10),
  timeRange: Duration.hours(6), // show metrics from now-6h to now
  plugins: [
    {
      name: 'grafana-piechart-panel',
      version: '1.3.6',
    }
  ],
});

Note: the kubernetes grafana operator only supports one Grafana instance per namespace (see https://github.com/grafana-operator/grafana-operator/issues/174). This may require specifying namespaces explicitly, e.g.:

const devGrafana = new Grafana(this, 'my-grafana', {
  namespace: 'dev',
});
const prodGrafana = new Grafana(this, 'my-grafana', {
  namespace: 'prod',
});

The grafana operator must be installed in each namespace for the resources in that namespace to be recognized.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Metadata

Release files for cdk8s-grafana 0.1.825

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdk8s-grafana 0.1.825
File Size Uploaded Provenance Actions
cdk8s_grafana-0.1.825.tar.gz 327.8 kB With provenance Details for cdk8s_grafana-0.1.825.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cdk8s-grafana 0.1.825
File Interpreter ABI Platform Actions
cdk8s_grafana-0.1.825-py3-none-any.whl Python 3 none any Details for cdk8s_grafana-0.1.825-py3-none-any.whl

Total release size: 653.7 kB

Release files / cdk8s_grafana-0.1.825.tar.gz

Download URL cdk8s_grafana-0.1.825.tar.gz
Size 327.8 kB
Tags Source
SHA-256 checksum
How to use checksums
102715632b4837c8556d1cc40432c2be6d97cb3e1e16b47bdf7c34d8d2a690a0
BLAKE2b-256 checksum
How to use checksums
350f3d43329247f4e7c63621a246cfeaff55caa1185cf5527952e0820800b2a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.14.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / cdk8s_grafana-0.1.825-py3-none-any.whl

Download URL cdk8s_grafana-0.1.825-py3-none-any.whl
Size 325.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6a5af7241a9956ac98fe26cf8ac5bbadd411e6f05cac9c3a7ec76ae8c0cbf3a
BLAKE2b-256 checksum
How to use checksums
92c14a7729e3fac5e5aa33695f9751bb32f6f44355c012dd71b144afe0c3aecb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.14.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for cdk8s-grafana 0.1.825

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cdk8s_grafana-0.1.825.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.825 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page