Tool Installation

Installing kubectl

Amazon EKS clusters require the kubectl, kubelet, and aws-cli or aws-iam-authenticator tools to enable IAM authentication for your Kubernetes cluster.

  1. Install kubectl by using the following commands:
sudo curl --silent --location -o /usr/local/bin/kubectl \
   https://amazon-eks.s3.us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/kubectl

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

Create Workspace

For more information, refer to the official AWS guide for installing kubectl.

  1. Update awscli with the following commands:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

Create Workspace

  1. Verify the installation by running the following command:
for command in kubectl jq envsubst aws
  do
    which $command &>/dev/null && echo "$command in path" || echo "$command NOT FOUND"
  done

Create Workspace

  1. Enable kubectl bash completion with the following commands:
kubectl completion bash >>  ~/.bash_completion
. /etc/profile.d/bash_completion.sh
. ~/.bash_completion

Create Workspace