Use custom images and environment variables in Grafana Cloud k6 Private Load Zones
We have released the two most requested features for Grafana Cloud k6 Private Load Zones: support for custom images and cloud environment variables.
With custom images, you can run tests using a custom k6 binary. For example, if you have a k6 build with extensions, you can test protocols that are not supported by default in k6.
You can configure a custom image in the PrivateLoadZone spec, by using the spec.image
field. After that, all your tests in that private load zone will use the custom image. This can be used to configure:
- A specific version of k6, such as
grafana/k6:0.51.0
. - A custom build of k6 with extensions, built with the xk6 tool.
- A custom build of the k6 binary.
You can also use a custom image stored in a private registry by using the spec.imagePullSecrets
field.
Using cloud environment variables can help you make your tests more reusable and configurable. For example, you can use it to define variables that switch the test environment for your test script or to configure test data, while keeping that information easily accessible for you and your team in Grafana Cloud k6.
All environment variables configured in Grafana Cloud k6 are sent to the PLZ test runs, and can be referenced from your k6 scripts.
To learn more, refer to the docs and the following video demo: