Install Kubernetes Tools

Amazon EKS clusters require kubectl and kubelet binaries and the aws-cli or aws-iam-authenticator binary to allow IAM authentication for your Kubernetes cluster.

In this workshop we will give you the commands to download the Linux binaries. If you are running Mac OSX / Windows, please see the official EKS docs for the download links.

Install kubectl

If needed, you can download the latest version of kubectl from install-kubectl resource.

sudo curl --silent --location -o /usr/local/bin/kubectl \

sudo chmod +x /usr/local/bin/kubectl

Install eksctl

sudo curl --silent --location "$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin

Update awscli

Upgrade AWS CLI according to guidance in AWS documentation.

curl "" -o ""
sudo ./aws/install

Run the following command to verify that the AWS CLI has been upgraded:

aws --version

You should see the following output

aws-cli/2.2.15 Python/3.8.8 Linux/4.14.232-177.418.amzn2.x86_64 exe/x86_64.amzn.2 prompt/off

Install jq, envsubst (from GNU gettext utilities) and bash-completion

sudo yum -y install jq gettext bash-completion moreutils nc

Install yq for yaml processing

echo 'yq() {
  docker run --rm -i -v "${PWD}":/workdir mikefarah/yq "$@"
}' | tee -a ~/.bashrc && source ~/.bashrc

Verify the binaries are in the path and executable

for command in kubectl eksctl jq aws nc git
    which $command &>/dev/null && echo "$command in path" || echo "$command NOT FOUND"

Enable kubectl bash_completion

kubectl completion bash >>  ~/.bash_completion
. /etc/profile.d/
. ~/.bash_completion

Set alias for kubectl

echo 'alias k=kubectl' >>~/.bashrc
echo 'complete -F __start_kubectl k' >>~/.bashrc
. ~/.bashrc