Skip to content

k6-operator: add troubleshooting to image with extension #2028

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ The k6 runners fail to start, and in the k6 Operator logs, you see the `unable t

1. Your Kubernetes setup includes some tool that is implicitly adding symbols to the log output of Pods. You can verify this case by checking the logs of the initializer Pod: they should contain valid JSON, generated by k6. Currently, to fix this, the tool adding symbols must be switched off for the k6 Operator workloads.

2. Multi-file script includes many files which all must be fully accessible from the runner Pod. You can verify this case by checking the logs of the initializer Pod: there will be an error about some file not being found. To fix this, refer to [Multi-file tests](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/usage/executing-k6-scripts-with-testrun-crd/#multi-file-tests) on how to configure multi-file tests in `TestRun`.
1. Multi-file script includes many files which all must be fully accessible from the runner Pod. You can verify this case by checking the logs of the initializer Pod: there will be an error about some file not being found. To fix this, refer to [Multi-file tests](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/usage/executing-k6-scripts-with-testrun-crd/#multi-file-tests) on how to configure multi-file tests in `TestRun`.

3. There are problems with environment variables or with importing an extension. Following the steps found in [testing locally](#test-your-script-locally) can help debug this issue. One additional command that you can use to help diagnose issues with your script is the following:
1. There are problems with environment variables or with importing an extension. Following the steps found in [testing locally](#test-your-script-locally) and in [troubleshooting extensions](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/usage/extensions#troubleshooting) can help debug this issue. One additional command that you can use to help diagnose issues with your script is the following:

```bash
k6 inspect --execution-requirements script.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,12 @@ spec:
```

Note that this examples overrides the default image with `k6-extended:latest`, and it includes environment variables that are required by the `xk6-output-influxdb` extension.

## Troubleshooting

If a `TestRun` with a custom image does not start the test and the k6 Operator [logs an error about the initializer](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/troubleshooting/#an-error-on-reading-output-of-the-initializer-pod), check the following command:
```sh
docker run --entrypoint sh k6-extended:local -c "ls -l && k6 version"
```

This command should execute without an error.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ The k6 runners fail to start, and in the k6 Operator logs, you see the `unable t

1. Your Kubernetes setup includes some tool that is implicitly adding symbols to the log output of Pods. You can verify this case by checking the logs of the initializer Pod: they should contain valid JSON, generated by k6. Currently, to fix this, the tool adding symbols must be switched off for the k6 Operator workloads.

2. Multi-file script includes many files which all must be fully accessible from the runner Pod. You can verify this case by checking the logs of the initializer Pod: there will be an error about some file not being found. To fix this, refer to [Multi-file tests](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/usage/executing-k6-scripts-with-testrun-crd/#multi-file-tests) on how to configure multi-file tests in `TestRun`.
1. Multi-file script includes many files which all must be fully accessible from the runner Pod. You can verify this case by checking the logs of the initializer Pod: there will be an error about some file not being found. To fix this, refer to [Multi-file tests](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/usage/executing-k6-scripts-with-testrun-crd/#multi-file-tests) on how to configure multi-file tests in `TestRun`.

3. There are problems with environment variables or with importing an extension. Following the steps found in [testing locally](#test-your-script-locally) can help debug this issue. One additional command that you can use to help diagnose issues with your script is the following:
1. There are problems with environment variables or with importing an extension. Following the steps found in [testing locally](#test-your-script-locally) and in [troubleshooting extensions](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/usage/extensions#troubleshooting) can help debug this issue. One additional command that you can use to help diagnose issues with your script is the following:

```bash
k6 inspect --execution-requirements script.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,12 @@ spec:
```

Note that this examples overrides the default image with `k6-extended:latest`, and it includes environment variables that are required by the `xk6-output-influxdb` extension.

## Troubleshooting

If a `TestRun` with a custom image does not start the test and the k6 Operator [logs an error about the initializer](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/troubleshooting/#an-error-on-reading-output-of-the-initializer-pod), check the following command:
```sh
docker run --entrypoint sh k6-extended:local -c "ls -l && k6 version"
```

This command should execute without an error.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ The k6 runners fail to start, and in the k6 Operator logs, you see the `unable t

1. Your Kubernetes setup includes some tool that is implicitly adding symbols to the log output of Pods. You can verify this case by checking the logs of the initializer Pod: they should contain valid JSON, generated by k6. Currently, to fix this, the tool adding symbols must be switched off for the k6 Operator workloads.

2. Multi-file script includes many files which all must be fully accessible from the runner Pod. You can verify this case by checking the logs of the initializer Pod: there will be an error about some file not being found. To fix this, refer to [Multi-file tests](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/usage/executing-k6-scripts-with-testrun-crd/#multi-file-tests) on how to configure multi-file tests in `TestRun`.
1. Multi-file script includes many files which all must be fully accessible from the runner Pod. You can verify this case by checking the logs of the initializer Pod: there will be an error about some file not being found. To fix this, refer to [Multi-file tests](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/usage/executing-k6-scripts-with-testrun-crd/#multi-file-tests) on how to configure multi-file tests in `TestRun`.

3. There are problems with environment variables or with importing an extension. Following the steps found in [testing locally](#test-your-script-locally) can help debug this issue. One additional command that you can use to help diagnose issues with your script is the following:
1. There are problems with environment variables or with importing an extension. Following the steps found in [testing locally](#test-your-script-locally) and in [troubleshooting extensions](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/usage/extensions#troubleshooting) can help debug this issue. One additional command that you can use to help diagnose issues with your script is the following:

```bash
k6 inspect --execution-requirements script.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,12 @@ spec:
```

Note that this examples overrides the default image with `k6-extended:latest`, and it includes environment variables that are required by the `xk6-output-influxdb` extension.

## Troubleshooting

If a `TestRun` with a custom image does not start the test and the k6 Operator [logs an error about the initializer](https://grafana.com/docs/k6/latest/set-up/set-up-distributed-k6/troubleshooting/#an-error-on-reading-output-of-the-initializer-pod), check the following command:
```sh
docker run --entrypoint sh k6-extended:local -c "ls -l && k6 version"
```

This command should execute without an error.