Skip to content

aws-iam-authenticator not found when kube config contains exec env variables #243

@michaelgeorgeattard

Description

@michaelgeorgeattard

I am getting an aws-iam-authenticator not found error with the following kube config snippet:

users:
- name: arn:aws:eks:eu-west-1:111111111111:cluster/foo
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - token
      - -i
      - foo
      command: aws-iam-authenticator
      env:
      - name: AWS_PROFILE
        value: bar

Looks like this is due to a bug in exec_auth.ts:

const result = shell.exec(cmd, opts);

shelljs.exec second parameter is defined below:

https://github.com/shelljs/shelljs#execcommand--options--callback

Maybe this could be solved using something like:

exec.env.forEach((elt) => {
  shell.env[elt.name] = elt.value;
});

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