Setting up machine for EKS

By in , ,
No comments

1) Install aws. Make sure aws >= 1.16; After installing make sure that aws is in the path

pip3 install awscli --upgrade --user

2) Get the devops user credentials Make sure you have set up login (ie added the user in system:masters group in aws-auth configmap). This the one of the first thing we will do while setting up a eks cluster. We can always update it also. https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html

aws configure

3) Verify user is set up correctly by the configure step

 aws sts get-caller-identity

4) Install kubectl (check depending on k8s version)

curl -o kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.9/2019-03-27/bin/linux/amd64/kubectl 
mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$HOME/bin:$PATH

5) Install aws-iam-authenticator

curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.12.7/2019-03-27/bin/linux/amd64/aws-iam-authenticator 
mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$HOME/bin:$PATH

6) Cleanup

echo 'export PATH=$HOME/bin:$PATH' >> ~/.zshrc 
rm kubectl aws-iam-authenticator

7) Get the kubeconfig

aws eks --region <<region>> update-kubeconfig --name <<name-of-the-cluster>> 

9) Test this

kubectl get svc

Links:

aws-iam-authenticator install

Kube config

AWS configure

kubectl install

EKS getting started

Leave a Reply

Your email address will not be published. Required fields are marked *