Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9eddaaf
chore: add basic structure for k6-operator docs
heitortsergent Apr 18, 2024
4ea406d
chore: hide reference for now
heitortsergent Apr 18, 2024
2f1015b
k6-operator: add main sections from the repo Readme.md
yorugac May 16, 2024
0731380
Add a short introduction to the index page
heitortsergent Jun 3, 2024
835339f
Update install-k6-operator.md
heitortsergent Jun 3, 2024
96b0ecf
Update upgrade-k6-operator.md
heitortsergent Jun 3, 2024
0bd07ec
Update troubleshooting.md
heitortsergent Jun 3, 2024
024875d
Update executing-k6-scripts-with-testrun-crd.md
heitortsergent Jun 3, 2024
fc15830
Update extensions.md
heitortsergent Jun 3, 2024
af61bb4
Update extensions.md
heitortsergent Jun 3, 2024
0bd92fb
Update common-options.md
heitortsergent Jun 3, 2024
66bd188
Update scheduling-tests.md
heitortsergent Jun 3, 2024
5c71c70
k6-operator: fix typos
yorugac Jun 14, 2024
8a7e311
k6-operator: add content for troubleshooting.md
yorugac Jun 14, 2024
9d046ed
chore: replaces instances of k6-operator with k6 Operator
heitortsergent Jul 1, 2024
b8b8104
chore: add uninstall instructions
heitortsergent Jul 1, 2024
1f999ad
chore: hide Upgrade k6 Operator page
heitortsergent Jul 1, 2024
c77a629
chore: add Use the k6 operator with Grafana Cloud k6 page
heitortsergent Jul 1, 2024
1d27807
chore: review troubleshooting doc
heitortsergent Jul 1, 2024
bc80292
chore: update Namespaced deployment heading to Watch namespace
heitortsergent Jul 1, 2024
c079328
Merge branch 'main' into chore/add-plz-docs
heitortsergent Jul 1, 2024
3f08b76
Apply suggestions from code review
heitortsergent Jul 19, 2024
ac060ef
Move docs to next and v0.52.x folders
heitortsergent Jul 19, 2024
6360694
Remove docs from v0.50.x folder
heitortsergent Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: add Use the k6 operator with Grafana Cloud k6 page
  • Loading branch information
heitortsergent committed Jul 1, 2024
commit c77a6298428f53010f7662bfb7845861577e71d8
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
weight: 250
title: Use the k6 Operator with Grafana Cloud k6
---

# Use the k6 Operator with Grafana Cloud k6

Grafana Cloud k6 is the Grafana Cloud offering of k6, which gives you access to all of k6 capabilities, while Grafana handles the infrastructure, storage, and metrics aggregation and insights from your tests.

When using the k6 Operator, you can still leverage Grafana Cloud k6 to get access to the metric analysis that the platform offers.
Comment thread
heitortsergent marked this conversation as resolved.
Outdated

There are two ways to use the k6 Operator with Grafana Cloud k6: Private Load Zones and Cloud output.

## Before you begin

To use the k6 Operator with Grafana Cloud k6, you’ll need:

- A [Grafana Cloud account](https://grafana.com/auth/sign-up/create-user).

## Private Load Zones

Private Load Zones (PLZ) are load zones that you can host inside your network by using the k6 Operator. You can start a cloud test in a PLZ by referencing it by name from your script, and the test will run in the nodes of your Kubernetes cluster.

Refer to [Set up private load zones](https://grafana.com/docs/grafana-cloud/testing/k6/author-run/private-load-zone-v2/) for more details.

## Cloud output

With k6, you can send the [output from a test run to Grafana Cloud k6](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/cloud) with the `k6 run --out cloud script.js` command. This feature is also available in the k6 Operator if you have a Grafana Cloud account.

{{< admonition type="note" >}}

The cloud output option only supports a `parallelism` value of 20 or less.

{{< /admonition >}}

To use this option in k6 Operator, set the argument in YAML:

```yaml
# ...
script:
configMap:
name: '<configmap>'
arguments: --out cloud
# ...
```

Then, if you installed operator with bundle or Helm, create a secret with the following command:

```bash
kubectl -n k6-operator-system create secret generic my-cloud-token \
--from-literal=token=<COPY YOUR TOKEN HERE> && kubectl -n k6-operator-system label secret my-cloud-token "k6cloud=token"
```

Alternatively, if you installed operator with a Makefile, you can uncomment the cloud output section in `config/default/kustomization.yaml` and copy your token from Grafana Cloud k6 there:

```yaml
# Uncomment this section if you need cloud output and copy-paste your token
secretGenerator:
- name: cloud-token
literals:
- token=<copy-paste-token-string-here>
options:
annotations:
kubernetes.io/service-account.name: k6-operator-controller
labels:
k6cloud: token
```

After updating the file, run `make deploy`.

After these steps, you can run k6 with the cloud output and default values of `projectID` and `name`.

Refer to [Cloud options](https://grafana.com/docs/grafana-cloud/testing/k6/author-run/cloud-scripting-extras/cloud-options/#cloud-options) for details on how to change the `projectID` and `name` options.