The way you install the plugin will vary depending on how you've installed your instance of Grafana. On this page, we'll show you how to install the plugin on a local Grafana instance, Grafana Cloud, and Grafana in a Kubernetes cluster.
First, install the Grafana CLI. Here are instructions to do that.
Then, execute the following command:
Restart your Grafana server after installing the plugin.
Click on the Install plugin button on the k6 Cloud Data Source page on Grafana.com.
The easiest way to install a plugin on Grafana in a Kubernetes cluster is to use the Helm Package Manager. You can install Helm here.
Create a file called values.yaml and copy the following into it:
If you want to configure other settings at this point, you can use this sample values.yaml file as a guide. When you're done, save the file locally.
Add the Grafana Helm Charts repository to Helm:
Now, install Grafana, using the values.yaml file that you created earlier:
To access your k6 Cloud test results, you need to configure your k6 Cloud Token on the k6 Cloud Grafana data source.
From the Grafana UI, access the Data sources page (Settings > Data sources), search for the k6 Cloud Grafana data source, and select it.
Copy your k6 Cloud Token and paste it into the API Token field. Click the Save & Test button to verify that your token is valid and that the data source can connect to k6 Cloud.
The k6 Cloud data source includes two dashboards. Import both from the Dashboards tab.
You can now select a k6 dashboard to find a test across all your k6 projects and visualize the test results in Grafana.
The k6 Cloud Test Runs List dashboard displays all tests executed on k6 Cloud. Choose the appropriate values in the Organization, Project, and Test dropdown menus to find the tests you're looking for.
The k6 Cloud Test Run Result dashboard displays metrics for the selected test. You can get to this dashboard by selecting it in Dashboards > Home within the Grafana UI or by clicking on a test from the k6 Cloud Test Runs List dashboard. You can also select the right test by choosing different options from the Organization, Project, Test, and Test Run dropdown menus.
- Demo of installing the k6 Cloud Grafana data source plugin on Grafana Cloud, from the Intro to load testing with k6 and Grafana webinar (video)
- How to install and use the k6 Cloud Grafana data source plugin (video)