How do i install the aws-iam-authenticator for aws eks?



  • The go programming language has a command to grab a github repository. For example part of the AWS EKS, you can use the aws-iam-authenticator.

    For installing go on linux also see: https://www.lightnetics.com/post/10390

    Note: Amazon EKS uses the Heptio Authenticator with kubectl for cluster authentication, which uses the same default AWS credential provider chain as the AWS CLI and AWS SDKs. If you have installed the AWS CLI on your system, then by default the Heptio authenticator will use the same credentials that are returned with the following command:

    To install it run the following:

    $ go get -u -v github.com/kubernetes-sigs/aws-iam-authenticator/cmd/aws-iam-authenticator
    

    Add PATH to shell environment.

    $ export PATH=$HOME/go/bin:$PATH
    

    Add the PATH to your shell.

    echo 'export PATH=$HOME/go/bin:$PATH' >> ~/.bashrc
    

    Verify you can run the command.

    $ aws-iam-authenticator help    
    A tool to authenticate to Kubernetes using AWS IAM credentials
    
    Usage:
      aws-iam-authenticator [command]
    
    Available Commands:
      help        Help about any command
      init        Pre-generate certificate, private key, and kubeconfig files for the server.
      server      Run a webhook validation server suitable that validates tokens using AWS IAM
      token       Authenticate using AWS IAM and get token for Kubernetes
      verify      Verify a token for debugging purpose
    
    Flags:
      -i, --cluster-id ID       Specify the cluster ID, a unique-per-cluster identifier for your aws-iam-authenticator installation.
      -c, --config filename     Load configuration from filename
      -h, --help                help for aws-iam-authenticator
      -l, --log-format string   Specify log format to use when logging to stderr [text or json] (default "text")
    
    Use "aws-iam-authenticator [command] --help" for more information about a command.
    

Log in to reply
 

© Lightnetics 2024