lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.49k stars 1.47k forks source link

Unable to connect to cluster which uses SSO with Pinniped Authentication #7422

Open viju2008 opened 1 year ago

viju2008 commented 1 year ago

Dear Sir,

FOR SSO in Kubernetes login for authentication we are using pinniped. The LENS is unable to connect to the Kubernetes cluster using pinniped authentication . Is there any plugin that can be added to LENS for support Pinniped OIDC login.

Pinniped opens a GUI where the Credentials have to be entered and then the token is returned or refreshed.

Why is this needed:

Many clusters now a days used either keycloak or pinniped authentication. The LENS will become usable with more clusters which use pinniped authetnication

Environment you are Lens application on: Windows

Open Source Kubernetes

Windows 10

veyselsahin commented 2 weeks ago

a solution for someone who is still struggling

    - name: oidc
      user:
        exec:
            apiVersion: client.authentication.k8s.io/v1beta1
            args:
                - oidc-login
                - get-token
                - --oidc-issuer-url=https://your-oidc-url
                - --oidc-client-id=kubernetes
                - --grant-type=password
                - --username=YOUR_USERNAME
                - --password=YOUR_PASS
            command: /usr/local/bin/kubectl
            env: null
            interactiveMode: IfAvailable
            provideClusterInfo: false