19 Eylül 2024 Perşembe

Fixing lens error: unknown command "oidc-login" for "kubectl"

 Here is a simple snippet for all who faces this issue:)

First of all, don't forget pass the environment variable

export PATH="$PATH:$HOME/.krew/bin"

and use full kubectl path as like I used below.


    - name: your_oidc

      user:

        exec:

            apiVersion: client.authentication.k8s.io/v1beta1

            args:

                - oidc-login

                - get-token

                - --oidc-issuer-url=https://your-oidc-issuer 

                - --oidc-client-id=kubernetes

                - --grant-type=password

                - --username=veysel.sahin

                - --password=YOURPASSWORD

            command: /usr/local/bin/kubectl

            env: null

            interactiveMode: IfAvailable

            provideClusterInfo: false

Share:

0 yorum:

Yorum Gönder