kubectl access works fine, but "out-of-cluster-client-configuration" says 'cannot list resource "pods"' #1358
Labels
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
On Windows 11, I have multiple versions of kubectl installed, and I can work with our remote clusters perfectly fine with it (using corresponding version of kubectl), including listing pods.
I'm now experimenting with writing a facade for common steps using client-go. To start, I tried just running the "out-of-cluster-client-configuration" sample after using kubectl to change my context to a cluster that I know I can access. That cluster is running v1.24.9, and I normally use kubectl v1.24.0 to work with it.
When I run the sample, it fails with:
panic: pods is forbidden: User "...@..." cannot list resource "pods" in API group "" at the cluster scope
What might I be missing?
Is the problem here that this build is using, by default, the latest version of client-go, which may not work with our older v1.24.0 k8s cluster? This sample just has the main.go, with no mod file for version specifications.
The text was updated successfully, but these errors were encountered: