본문 바로가기

AWS EKS 실습/EKS 환경 구성

2. 사전 준비 -3 (Install Kubernetes Tools)

ㅁ 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

 

 

ㅁ Update awscli

 

sudo pip install --upgrade awscli && hash -r

 

 

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

 

sudo yum -y install jq gettext bash-completion moreutils

 

 

ㅁ 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 jq envsubst aws
  do
    which $command &>/dev/null && echo "$command in path" || echo "$command NOT FOUND"
  done

 

 

ㅁ Enable kubectl bash_completion

 

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

 

ㅁ Set the AWS Load Balancer Controller version

 

echo 'export LBC_VERSION="v2.0.0"' >>  ~/.bash_profile
.  ~/.bash_profile