databricks / click

The "Command Line Interactive Controller for Kubernetes"
Apache License 2.0
1.49k stars 84 forks source link

Error setting context #37

Closed tomhicks closed 2 years ago

tomhicks commented 6 years ago

Sorry to be the guy that just goes "oh it isn't working". It's potentially entirely my fault, but...when I try to set my context I get this:

[Warning] Couldn't find/load context <gcp_context_name>, now no current context.  Error: Failed to get config: Invalid context <gcp_context_name>.  Each user must have either a token, a username AND password, or a client-certificate AND a client-key.

I use kubectl all day, but can't for the life of me remember how I set it up in the first place.

rongou commented 6 years ago

I'm seeing the same error:

> ctx dev
Private key data was invalid: ()
[Warning] Couldn't find/load context dev, now no current context.  Error: Failed to get config: Invalid certificate or key data for context: dev

Even though this works fine with kubectl.

ledor473 commented 6 years ago

I have the same problem. I think Click does not support OIDC users like what is documented here: https://cloud.google.com/community/tutorials/kubernetes-auth-openid-rbac

users:
- name: name@example.com
  user:
    auth-provider:
      config:
        client-id: 32934980234312-9ske1sskq89423480922scag3hutrv7.apps.googleusercontent.com
        client-secret: ZdyKxYW-tCzuRWwB3l665cLY
        id-token: eyJhbGciOiJSUzI19fvTKfPraZ7yzn.....HeLnf26MjA
        idp-issuer-url: https://accounts.google.com
        refresh-token: 18mxeZ5_AE.jkYklrMAf5.IMXnB_DsBY5up4WbYNF2PrY
      name: oidc
rohitagarwal003 commented 6 years ago

Dupe of https://github.com/databricks/click/issues/18

nicklan commented 6 years ago

This isn't quite a dup. We now support gke clusters, but not OIDC yet. I will be adding OIDC support as soon as possible (but probably not quite for the next release)

nicklan commented 2 years ago

basic oidc support should be there. please test and open a new issue if you run into trouble