K6 pods not getting created on k8-cluster

Hi Team,
I have installed a k6-operator on my Kubernetes cluster on google cloud following the below link.

After creating config-map, pod creation gave below error
time="2022-07-06T05:00:47Z" level=error msg="unknown flag: --execution-requirements".
Multiple pods getting created one after one.

These are logs from the k6-operator pod and manager container

2022-07-06T04:57:39.855Z	INFO	controller-runtime.metrics	metrics server is starting to listen	{"addr": "127.0.0.1:8080"}
2022-07-06T04:57:39.855Z	INFO	setup	starting manager
I0706 04:57:39.856226       1 leaderelection.go:242] attempting to acquire leader lease  k6-operator-system/fcdfce80.io...
2022-07-06T04:57:39.856Z	INFO	controller-runtime.manager	starting metrics server	{"path": "/metrics"}
I0706 04:57:39.870476       1 leaderelection.go:252] successfully acquired lease k6-operator-system/fcdfce80.io
2022-07-06T04:57:39.870Z	DEBUG	controller-runtime.manager.events	Normal	{"object": {"kind":"ConfigMap","namespace":"k6-operator-system","name":"fcdfce80.io","uid":"cc56e0e5-679c-43f5-bc36-70500f4c6ed1","apiVersion":"v1","resourceVersion":"11290"}, "reason": "LeaderElection", "message": "k6-operator-controller-manager-5b6fccc8b7-dmcjp_dceef818-dbf8-48b2-bc79-f017d27afc38 became leader"}
2022-07-06T04:57:39.870Z	INFO	controller	Starting EventSource	{"reconcilerGroup": "k6.io", "reconcilerKind": "K6", "controller": "k6", "source": "kind source: /, Kind="}
2022-07-06T04:57:39.970Z	INFO	controller	Starting EventSource	{"reconcilerGroup": "k6.io", "reconcilerKind": "K6", "controller": "k6", "source": "kind source: /, Kind="}
2022-07-06T04:57:40.071Z	INFO	controller	Starting Controller	{"reconcilerGroup": "k6.io", "reconcilerKind": "K6", "controller": "k6"}
2022-07-06T04:57:40.071Z	INFO	controller	Starting workers	{"reconcilerGroup": "k6.io", "reconcilerKind": "K6", "controller": "k6", "worker count": 1}
2022-07-06T05:00:29.945Z	INFO	controllers.K6	Reconcile(); stage = 	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:00:29.945Z	INFO	controllers.K6	Initialize test	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:00:29.945Z	INFO	controllers.K6	Changing stage of K6 status to initialization	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:00:29.960Z	INFO	controllers.K6	Initializer job is ready to start with image `us-central1-docker.pkg.dev/engineering-330305/governor-k8s-testing/k6-prometheus:latest` and command `[sh -c k6 archive /test/req_otp.js -O ./req_otp.js.archived.tar --insecure-skip-tls-verify && k6 inspect --execution-requirements ./req_otp.js.archived.tar]`	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:00:30.091Z	INFO	controllers.K6	No initializing pod found yet	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:00:35.092Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:00:40.092Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:00:45.092Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:00:50.093Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:00:55.092Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:01:00.092Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:01:05.092Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:01:10.092Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:01:15.093Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:01:20.092Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:01:25.093Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:01:30.092Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:01:30.092Z	INFO	controllers.K6	Waiting for initializing pod to finish	{"k6": "perf-testing/k6-req-otp-constant-rate-testing"}
2022-07-06T05:01:30.092Z	ERROR	controllers.K6	Failed to initialize the script	{"k6": "perf-testing/k6-req-otp-constant-rate-testing", "error": "timed out waiting for the condition"}
github.com/go-logr/zapr.(*zapLogger).Error
	/go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128
github.com/grafana/k6-operator/controllers.InitializeJobs
	/workspace/controllers/k6_initialize.go:152
github.com/grafana/k6-operator/controllers.(*K6Reconciler).Reconcile
	/workspace/controllers/k6_controller.go:63

the cluster has e2d-standard-16 type machine. let me know if any input is required.

Hi @prateek_pagaria
Welcome to the forum :wave:
Most likely this error is because of an outdated version of k6: it must be v0.36+. There was recently a very similar issue encountered by another user here:

It is esp. easy to encounter this error if you’re relying on xk6 extension, as described in the Github issue. Please re-check your k6 version - that should resolve the error. Hope that helps!