Skip to content
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

how to use K6_WEB_DASHBOARD in operator mode? #478

Open
CoffeeHi opened this issue Oct 11, 2024 · 4 comments
Open

how to use K6_WEB_DASHBOARD in operator mode? #478

CoffeeHi opened this issue Oct 11, 2024 · 4 comments
Labels
question Further information is requested

Comments

@CoffeeHi
Copy link

Hi guys, I deploy k6 operator in k8s cluster, but I don't know how to show K6_WEB_DASHBOARD when running TestRun CR, is it possible to show K6_WEB_DASHBOARD in distributed mode k6?
I have tried in TestRun CR, but does not work.

  runner:
    env:
      - name: K6_WEB_DASHBOARD
        value: "true"
      - name: K6_WEB_DASHBOARD_PORT
        value: "5665"
      - name: K6_WEB_DASHBOARD_OPEN
        value: "true"
@joanlopez joanlopez transferred this issue from grafana/k6 Oct 11, 2024
@joanlopez
Copy link

Hi @CoffeeHi,

I'm sorry, but we don't have large expertise with the k6-operator.
So, let me transfer it to its specific repository, so any of its maintainers can try to help with this 🙇🏻

@joanlopez joanlopez removed their assignment Oct 11, 2024
@yorugac
Copy link
Collaborator

yorugac commented Oct 25, 2024

Hi @CoffeeHi, sorry for the delay! Are you trying to find one dashboard per test with aggregated data from all runners? Or are you trying to open a dashboard to one, specific runner and configuration does not work?

@yorugac yorugac added the question Further information is requested label Oct 25, 2024
@CoffeeHi
Copy link
Author

CoffeeHi commented Nov 3, 2024

Hi @yorugac , I want to open a dashboard to one, as I known from https://grafana.com/docs/k6/latest/results-output/web-dashboard/ , I can get a runtime dashboard running K6_WEB_DASHBOARD=true k6 run script.js locally, how can I do this using k6-operator in k8s cluster?

@yorugac
Copy link
Collaborator

yorugac commented Nov 11, 2024

Hi @CoffeeHi, it appears that you have already passed the dashboard option to the runners successfully:

  runner:
    env:
      - name: K6_WEB_DASHBOARD
        value: "true"

K6_WEB_DASHBOARD_OPEN makes no impact here because you're running k6 in a container: it isn't supposed to have access to your browser. But you can port-forward to any runner's dashboard with this:

kubectl port-forward pod/k6-sample-1-g4tnf 5665

And then open the dashboard in your browser just as you do with k6 standalone, that is by going to http://127.0.0.1:5665/.
Each runner will have its own dashboard.

Let me know if additional information is needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants