How to run multi-scenario k6 test with 1 constant VU for each scenario in k6 kubernetes cluster

Hi!
I’m trying to run in kubernetes cluster multi-scenario k6 test (5 scenarios, 1 VU for each scenario, executor constant-vus) with parallelism 5. I want to distribute the job among 5 instances (1 pod for one scenario with 1 VU).

const scenarios= {
    'test1': {
      executor: 'constant-vus',
      vus: 1,
      duration: 60m,
      options: {
        browser: {
          type: 'chromium',
        },
      },
      exec: 'test1',
    },
    'test2': {
      executor: 'constant-vus',
      vus: 1,
      duration: 60m,
      options: {
        browser: {
          type: 'chromium',
        },
      },
      exec: 'test2',
    },
    'test3': {
      executor: 'constant-vus',
      vus: 1,
      duration: 60m,
      options: {
        browser: {
          type: 'chromium',
        },
      },
      exec: 'test3',
    },
    'test4': {
      executor:  'constant-vus',
      vus: 1,
      duration: 60m,
      options: {
        browser: {
          type: 'chromium',
        },
      },
      exec: 'test4',
    },
    'test5': {
      executor:  'constant-vus',
      vus: 1,
      duration: 60m,
      options: {
        browser: {
          type: 'chromium',
        },
      },
      exec: 'test5',
    },
  }

I have these warning messages in 4 pods and after 1 pod is running and another 4 completed.

{"level":"warning","msg":"Executor 'test1' is disabled for segment 4/5:1 due to lack of work!","time":"2024-01-04T16:38:44Z"}
{"level":"warning","msg":"Executor 'test2' is disabled for segment 4/5:1 due to lack of work!","time":"2024-01-04T16:38:44Z"}
{"level":"warning","msg":"Executor 'test3' is disabled for segment 4/5:1 due to lack of work!","time":"2024-01-04T16:38:44Z"}
{"level":"warning","msg":"Executor 'test4' is disabled for segment 4/5:1 due to lack of work!","time":"2024-01-04T16:38:44Z"}
{"level":"warning","msg":"Executor 'test5' is disabled for segment 4/5:1 due to lack of work!","time":"2024-01-04T16:38:44Z"}

Hello @annah , welcome to the community forum!

I think this happens because you run the scenarios on 1 VU, and k6-operator can’t split 1 VU into 5 pods. What is the purpose of running on 1 VU? Do you want to run the 5 test methods on 5 instances?

1 Like

Hello @bandorko yes I want to run each scenario with 1VU in 1 pod. My test include 5 scenarios and I need to ran each scenario on a separate agent with one user.