K6 Operator Parallel Pod Index's

Hey all!
Is there a method for when I am running my tests in parallel using the k6 operator parallelism feature to figure out which pod index the test is running on. My issue is since I am running parallel and my auth is done in a setup function all the pods are running the auth function instead of just one of them causing issues with the same account logging in across different locations. So if I could get a feature to be able to call to an environment variable or something of the sort that has the pod index I can have each pod use a different account sign in but as it is right now there is no way to identify which pod my test is running in easily.

Hi @alexcentorbi07!

Maybe you could try to use the instance_id tag for this:

import exec from 'k6/execution';

export const options = {
    scenarios: {
        perftest: {
            executor: 'shared-iterations',
            vus: 10,
            iterations: 20
        }
    }
};

export default function () {
    console.log(exec.test.options.tags.instance_id);
}

I hope this helps

That worked perfectly thank you!