I have the K6 operator installed in a K8s cluster and using helm charts I am creating the required ConfigMap
and K6 CustomResource
to kickstart a load test. I am able to successfully run tests in my local cluster but when deploying to a staging cluster I am not seeing the tests run.
I was able to verify that the new custom resource was created and acknowledged as I see the initializer pod get started
> kubectl get pods
pod/ingestion-load-shedder-2022-09-2-initializer-bj8nq 0/1 Completed 0 10m
The initializer seems to complete straight away and looking at the logs of the initializer I see the config for my test (excluding non-relevant fields)
{
...
"scenarios": {
"constant": {
"executor": "constant-arrival-rate",
"rate": 2500,
"timeUnit": "1m0s",
"duration": "5m0s",
"preAllocatedVUs": 1000,
}
},
"totalDuration": "5m30s",
"maxVUs": 1000
}
but do not see any runners. These are the logs I see in the manager pod
> kubectl logs k6-operator-controller-manager-6cdcf8cd9c-7w4xp -c manager
...
2022-09-27T20:23:18.988Z INFO controllers.K6 Reconcile(); stage = initialization {"k6": "k6-operator/ingestion-load-shedder-2022-09-2"}
2022-09-27T20:23:18.988Z DEBUG controller Successfully Reconciled {"reconcilerGroup": "k6.io", "reconcilerKind": "K6", "controller": "k6", "name": "ingestion-load-shedder-2022-09-2", "namespace": "k6-operator"}
These are the manager logs when running it locally
2022-09-28T18:40:56.876Z INFO controllers.K6 Reconcile(); stage = {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:40:56.877Z INFO controllers.K6 Initialize test {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:40:56.877Z INFO controllers.K6 Changing stage of K6 status to initialization {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:40:57.070Z INFO controllers.K6 Initializer job is ready to start with image `ghcr.io/grafana/operator:latest-runner` and command `[sh -c k6 archive --log-output=none /test/script -O ./script.archived.tar && k6 inspect --execution-requirements --log-output=none ./script.archived.tar]` {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:40:58.573Z INFO controllers.K6 Waiting for initializing pod to finish {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:03.574Z INFO controllers.K6 Waiting for initializing pod to finish {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:08.575Z INFO controllers.K6 Waiting for initializing pod to finish {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:13.575Z INFO controllers.K6 Waiting for initializing pod to finish {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:18.574Z INFO controllers.K6 Waiting for initializing pod to finish {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:23.872Z INFO controllers.K6 k6 inspect: {External:{Loadimpact:{Name: ProjectID:0}} TotalDuration:1m30s MaxVUs:1000 Thresholds:map[]} {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:23.872Z INFO controllers.K6 Changing stage of K6 status to initialized {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:23.970Z DEBUG controller Successfully Reconciled {"reconcilerGroup": "k6.io", "reconcilerKind": "K6", "controller": "k6", "name": "ingestion-load-shedder-2022-09-1", "namespace": "k6-operator"}
2022-09-28T18:41:23.971Z INFO controllers.K6 Reconcile(); stage = initialized {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:23.971Z INFO controllers.K6 Creating test jobs {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:23.971Z INFO controllers.K6 Launching k6 test #1 {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:23.972Z INFO controllers.K6 Runner job is ready to start with image `ghcr.io/grafana/operator:latest-runner` and command `[k6 run --quiet --execution-segment=0:1/2 --execution-segment-sequence=0,1/2,1 /test/script --address=0.0.0.0:6565 --paused --tag instance_id=1 --tag job_name=ingestion-load-shedder-2022-09-1-1]` {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:24.270Z INFO controllers.K6 Launching k6 test #2 {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:24.271Z INFO controllers.K6 Runner job is ready to start with image `ghcr.io/grafana/operator:latest-runner` and command `[k6 run --quiet --execution-segment=1/2:1 --execution-segment-sequence=0,1/2,1 /test/script --address=0.0.0.0:6565 --paused --tag instance_id=2 --tag job_name=ingestion-load-shedder-2022-09-1-2]` {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:24.469Z INFO controllers.K6 Changing stage of K6 status to created {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:24.477Z DEBUG controller Successfully Reconciled {"reconcilerGroup": "k6.io", "reconcilerKind": "K6", "controller": "k6", "name": "ingestion-load-shedder-2022-09-1", "namespace": "k6-operator"}
2022-09-28T18:41:24.477Z INFO controllers.K6 Reconcile(); stage = created {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:24.477Z INFO controllers.K6 Waiting for pods to get ready {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:24.478Z INFO controllers.K6 0/2 pods ready {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
2022-09-28T18:41:29.479Z INFO controllers.K6 2/2 pods ready {"k6": "k6-operator/ingestion-load-shedder-2022-09-1"}
Any ideas what may be causing this discrepancy?