AWS AKS eksctl Install

10/10/2019

Trying to use AWS-AKS on Windows-10, following the instructions to install Chocolatey, eksctl, aws-iam-authenticator, etc. I have python 3.7 and upgraded my awscli etc etc. After all that I get:

eksctl v0.6.0 is the latest version available based on your source(s).

aws-iam-authenticator v0.4.0 is the latest version available based on your source(s).

But the instructions say: The eksctl GitTag version should be at least 0.7.0. If not, check your terminal output for any installation or upgrade errors. But my eksctl version is version.Info{BuiltAt:"", GitCommit:"", GitTag:"0.6.0"}. The console or chocolatey.log does not show any errors or anything meaningful.

Yes this version 0.6.0 ultimately does not work, shows no errors, but does not work.

Any ideas

-- Sam-T
amazon-eks
amazon-web-services
kubectl
kubernetes

2 Answers

10/22/2019

This issue was resolved by configuring the AWS CLI to the correct region i.e regions where EKS is supported. Currently it is supported in US in us-west-2, us-east-1 and us-east-2. Once I reconfigured the CLI to us-west-2 and then upgraded eksctl brew upgrade eksctl && brew link --overwrite eksctl. Then I got the correct 0.7.0 version of eksctl.
The documentation does not say this, sort of makes sense, but learnt it the hard way. (I had reconfigured the CLI earlier, for reasons of other errors, but had not upgraded eksctl after that).

Importantly without the correct 0.7.0 version things wont work. Additionally you must use the same User for Console and CLI. All these nuances have to kept in mind for this to work.

-- Sam-T
Source: StackOverflow

10/10/2019

You can try Installing aws-iam-authenticator manually.

To install **aws-iam-authenticator on Windows**

  1. Open a PowerShell terminal window and download the Amazon EKS-vended aws-iam-authenticator binary from Amazon S3:

    curl -o aws-iam-authenticator.exe https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/2019-08-22/bin/windows/amd64/aws-iam-authenticator.exe

  2. (Optional) Verify the downloaded binary with the SHA-256 sum provided in the same bucket prefix.

    • Download the SHA-256 sum for your system.

      curl -o aws-iam-authenticator.sha256 https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/2019-08-22/bin/windows/amd64/aws-iam-authenticator.exe.sha256

    • Check the SHA-256 sum for your downloaded binary.

      Get-FileHash aws-iam-authenticator.exe

    • Compare the generated SHA-256 sum in the command output against your downloaded SHA-256 file. The two should match, although the PowerShell output will be uppercase.

  3. Copy the binary to a folder in your PATH. If you have an existing directory in your PATH that you use for command line utilities, copy the binary to that directory. Otherwise, complete the following steps.

      1. Create a new directory for your command line binaries, such as C:\bin.
      1. Copy the aws-iam-authenticator.exe binary to your new directory.
      1. Edit your user or system PATH environment variable to add the new directory to your PATH.
      1. Close your PowerShell terminal and open a new one to pick up the new PATH variable.
  4. Test that the aws-iam-authenticator binary works.

    aws-iam-authenticator help

After that try again using chocolatey upgrade -y eksctl.

Installtion docs on eksctl say:

You will need to have AWS API credentials configured. What works for AWS CLI or any other tools (kops, Terraform etc), should be sufficient. You can use ~/.aws/credentials file or environment variables. For more information read AWS documentation.

You will also need AWS IAM Authenticator for Kubernetes command (either aws-iam-authenticator or aws eks get-token (available in version 1.16.156 or greater of AWS CLI) in your PATH.

-- Crou
Source: StackOverflow