ahmetb / kubectl-pods_on

kubectl plugin to query Pods by Node names or selectors
Apache License 2.0
121 stars 2 forks source link

No Auth Provider found for name "oidc" #1

Open r0bj opened 4 weeks ago

r0bj commented 4 weeks ago

I encountered an issue while using the kubectl-pods_on plugin, where it fails with the following error message:

F1021 19:11:43.839135    3675 main.go:104] failed to create clientset: no Auth Provider found for name "oidc"

kubeconfig user:

- name: <email>
  user:
    auth-provider:
      config:
        client-id: <client-id>
        client-secret: <client-secret>
        id-token: <id-token>
        idp-issuer-url: <idp-issuer-url>
        refresh-token: <refresh-token>
      name: oidc

It seems the plugin is unable to recognize the oidc authentication provider. This configuration works correctly with kubectl and other plugins, but fails with this one.

Plugin version: v0.1.0

ahmetb commented 4 weeks ago

That's weird. I assumed client auth plugins (exec and oidc) no longer need to be imported in plugins. I suspect you'll hit this in many other kubectl plugins (beware).

I can fix it, it's fairly easy to.

r0bj commented 4 weeks ago

It’s interesting because I use other kubectl plugins like kubectl-foreach and kubectx, and they work perfectly fine with my kubeconfig setup. This issue seems isolated to the kubectl-pods_on plugin specifically.

ahmetb commented 4 weeks ago

Ah those usually shell out to kubectl; not use the client-go client.