Skip to content

Commit d8e0dc1

Browse files
committed
feat(k6-operator): add troubleshooting to image with extension
1 parent 06a2b15 commit d8e0dc1

File tree

6 files changed

+33
-6
lines changed

6 files changed

+33
-6
lines changed

docs/sources/k6/next/set-up/set-up-distributed-k6/troubleshooting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ The k6 runners fail to start, and in the k6 Operator logs, you see the `unable t
4545

4646
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.
4747

48-
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`.
48+
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`.
4949

50-
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:
50+
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:
5151

5252
```bash
5353
k6 inspect --execution-requirements script.js

docs/sources/k6/next/set-up/set-up-distributed-k6/usage/extensions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,12 @@ spec:
5959
```
6060
6161
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.
62+
63+
## Troubleshooting
64+
65+
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:
66+
```sh
67+
docker run --entrypoint sh k6-extended:local -c "ls -l && k6 version"
68+
```
69+
70+
This command should execute without an error.

docs/sources/k6/v1.0.x/set-up/set-up-distributed-k6/troubleshooting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ The k6 runners fail to start, and in the k6 Operator logs, you see the `unable t
4343

4444
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.
4545

46-
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`.
46+
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`.
4747

48-
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:
48+
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:
4949

5050
```bash
5151
k6 inspect --execution-requirements script.js

docs/sources/k6/v1.0.x/set-up/set-up-distributed-k6/usage/extensions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,12 @@ spec:
5959
```
6060
6161
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.
62+
63+
## Troubleshooting
64+
65+
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:
66+
```sh
67+
docker run --entrypoint sh k6-extended:local -c "ls -l && k6 version"
68+
```
69+
70+
This command should execute without an error.

docs/sources/k6/v1.1.x/set-up/set-up-distributed-k6/troubleshooting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ The k6 runners fail to start, and in the k6 Operator logs, you see the `unable t
4545

4646
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.
4747

48-
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`.
48+
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`.
4949

50-
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:
50+
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:
5151

5252
```bash
5353
k6 inspect --execution-requirements script.js

docs/sources/k6/v1.1.x/set-up/set-up-distributed-k6/usage/extensions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,12 @@ spec:
5959
```
6060
6161
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.
62+
63+
## Troubleshooting
64+
65+
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:
66+
```sh
67+
docker run --entrypoint sh k6-extended:local -c "ls -l && k6 version"
68+
```
69+
70+
This command should execute without an error.

0 commit comments

Comments
 (0)