Install Kubernetes Tool

Install Kubernetes Tool

  1. Copy and Paste the command below into the Terminal of VS Code (already SSH connected to EC2) to install kubectl.
sudo curl --silent --location -o /usr/local/bin/kubectl \
   https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.11/2020-09-18/bin/linux/amd64/kubectl

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

Install Kubernetes Tool

  1. Copy and Paste the command below into the Terminal of VS Code (already SSH connected to EC2) to update awscli.
sudo pip install --upgrade awscli && hash -r

Install Kubernetes Tool

  1. Copy and Paste the command below into the Terminal of VS Code (already SSH connected to EC2) to install tools for text processing on the command line.
sudo yum -y install jq gettext bash-completion

Install Kubernetes Tool

  1. We view jq like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep let you play with text.
echo 'yq() {
  docker run --rm -i -v "${PWD}":/workdir mikefarah/yq "$@"
}' | tee -a ~/.bashrc && source ~/.bashrc

Install Kubernetes Tool

  1. Verify that the tools are installed by running the command below.
for command in kubectl jq envsubst aws
  do
    which $command &>/dev/null && echo "$command in path" || echo "$command NOT FOUND"
  done

Install Kubernetes Tool

  1. Enable auto-completion feature for kubectl tool by running the command below:
kubectl completion bash >>  ~/.bash_completion
. /etc/profile.d/bash_completion.sh
. ~/.bash_completion

Install Kubernetes Tool

  1. Set version 3.5.0 when using AWS Load Balancer Controller
echo 'export LBC_VERSION="v3.5.0"' >>  ~/.bash_profile
.  ~/.bash_profile

Install Kubernetes Tool

For more information about installing Kubernetes Tool, see Kubernetes Tool