grafana / xk6-kubernetes

Client extension for interacting with Kubernetes clusters from your k6 tests.
Apache License 2.0
62 stars 20 forks source link

Error: the server could not find the requested resource #55

Closed vincent-grafana closed 2 years ago

vincent-grafana commented 2 years ago

After running the xk6-kubernetes example script add-ephemeral.js, I noticed an error on stout:

ERRO[0002] GoError: the server could not find the requested resource
running at reflect.methodValueCall (native)

The pod gets created, though. so the functionality of the script works as expected. This error just makes it seem like there's a failure somewhere...

When I try to kill (kill-pod.js) that pod created with the add-ephemeral.js script, I also get the error message. The pod does get killed.

The create-pod.js script does not produce this error message. Killing that pod (with kill-pod.js) comes back successful as well (no error message).

javaducky commented 2 years ago

From another discussion, it sounds like this is due to targeting a cluster on an older version of Kubernetes. The extension requires the EphemeralContainer resource which was introduced recently (it can be enabled using a feature flag back to v1.22 AFAIK).

@vincent-grafana please confirm that we can close this issue.

vincent-grafana commented 2 years ago

Agreed. We can close. The target cluster was on 1.17. After upgrading to 1.24, there was no error message. Thanks!