-
Notifications
You must be signed in to change notification settings - Fork 264
Add k6-operator docs to Set up #1559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
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 4ea406d
chore: hide reference for now
heitortsergent 2f1015b
k6-operator: add main sections from the repo Readme.md
yorugac 0731380
Add a short introduction to the index page
heitortsergent 835339f
Update install-k6-operator.md
heitortsergent 96b0ecf
Update upgrade-k6-operator.md
heitortsergent 0bd07ec
Update troubleshooting.md
heitortsergent 024875d
Update executing-k6-scripts-with-testrun-crd.md
heitortsergent fc15830
Update extensions.md
heitortsergent af61bb4
Update extensions.md
heitortsergent 0bd92fb
Update common-options.md
heitortsergent 66bd188
Update scheduling-tests.md
heitortsergent 5c71c70
k6-operator: fix typos
yorugac 8a7e311
k6-operator: add content for troubleshooting.md
yorugac 9d046ed
chore: replaces instances of k6-operator with k6 Operator
heitortsergent b8b8104
chore: add uninstall instructions
heitortsergent 1f999ad
chore: hide Upgrade k6 Operator page
heitortsergent c77a629
chore: add Use the k6 operator with Grafana Cloud k6 page
heitortsergent 1d27807
chore: review troubleshooting doc
heitortsergent bc80292
chore: update Namespaced deployment heading to Watch namespace
heitortsergent c079328
Merge branch 'main' into chore/add-plz-docs
heitortsergent 3f08b76
Apply suggestions from code review
heitortsergent ac060ef
Move docs to next and v0.52.x folders
heitortsergent 6360694
Remove docs from v0.50.x folder
heitortsergent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: add Use the k6 operator with Grafana Cloud k6 page
- Loading branch information
commit c77a6298428f53010f7662bfb7845861577e71d8
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
docs/sources/v0.50.x/set-up/set-up-distributed-k6/usage/k6-operator-to-gck6.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
|
|
||
| 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. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.