How to Install AWS IAM Authenticator on Windows/Linux/MacOs
The AWS IAM Authenticator for Kubernetes employed by Amazon EKS makes use of IAM to provide authentication to your Kubernetes cluster. Installing the AWS IAM Authenticator for Kubernetes and modifying kubectl’s configuration files to use it for authentication will allow you to configure the standard kubectl client to work with Amazon EKS.
Alternatively, you can install the AWS IAM Authenticator for Kubernetes on macOS, Linux, or Windows if you cannot run the AWS CLI version 1.16.156 or later to create the kubeconfig file.
macOS
To install aws-iam-authenticator with Homebrew
Using Homebrew will make the installation of aws-iam-authenticator simple.
Follow the commands below to install Homebrew on your Mac if it has not already been installed.
Comparing the output of the command against the downloaded aws-iam-authenticator.sha256 file will provide you with the SHA-256 sum. This should be the same.
Give the binary execution permissions.
chmod +x ./aws-iam-authenticator
Ensure the binary is copied into your $PATH folder. AWS-IAMAuthenticator should be placed in $HOME/bin, and the path to that file should be in $PATH. mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$PATH:$HOME/bin
Your downloaded binary’s SHA-256 sum should be checked.
Get-FileHash aws-iam-authenticator.exe
Check your downloaded SHA-256 file against the SHA-256 sum generated by the command output. It is important that they match, even though PowerShell will be written in uppercase.
Create a PATH folder in which to save the binary. Copy the binary to the directory you use for command-line utilities in your PATH. To do otherwise, follow these steps.
For example, you can create a directory called C:/bin for your command-line binaries.
Make a new directory in which to place the aws-iam-authenticator.exe binary.
By adding the new directory to your PATH environment variable, you will add it to your user or system path.
Delete the PowerShell terminal and start a new one, so the PATH variable is picked up.
Aws-IAM-Authenticator should be tested to make sure it works.
Leave a Comment