Skip to content

Load config fails with env: null in users/user/exec section #637

Description

@Lawouach

Hey there,

Client: 8.0.0a1
Server: Kubernetes 1.10.3
Provider: EKS

I created a cluster using eksctl and the generated kubeconf has the entry env: null under users/user/exec to which the client responds with:

ERROR:root:Invalid kube-config file. Expected key env in kube-config/users[name=iam-some-account@my-cluster.us-west-2.eksctl.io]/user/exec

When I remove the key entirely, it works nicely. When I fill the key with dictionary entries, it works too. I can only assume either env: null is invalid (then I will open a ticket on eksctl) or the client should support it.

Thanks,

Activity

  1. errordeveloper commented on Oct 4, 2018

    @errordeveloper

    hey @Lawouach, thanks for finding and reporting this! Arguably, all client should tolerate this (null instead of {} or []), as kubectl and k8s.io/client-go currently do. The root cause of this is the exec authentication plugin stanza, which is still an alpha API (client.authentication.k8s.io/v1alpha1).

    - name: ilya@unique-hideout-1536840907.us-west-2.eksctl.io
      user:
        exec:
          apiVersion: client.authentication.k8s.io/v1alpha1
          args:
          - token
          - -i
          - unique-hideout-1536840907
          command: heptio-authenticator-aws
          env: null
    

    So to me this looks like two bugs actual bugs, what do you think?

  2. Lawouach commented on Oct 4, 2018

    @Lawouach
    Author

    Thank you @errordeveloper for the feedback here. I was struggling to find the API definition for this API. Arguably, the client should likely not choke on this value indeed.

  3. sc250024 commented on Oct 9, 2018

    @sc250024

    Having the same problem. What was the outcome of this? Is there a PR with a fix, or is it something we all need to change?

  4. roycaihw commented on Oct 9, 2018

    @roycaihw
    Member

    I think @fillbit has a PR fixing this from client side: kubernetes-client/python-base#91. I will take a look at it today. Thanks for reporting :)

  5. roycaihw commented on Oct 12, 2018

    @roycaihw
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions