Deploying voting app using K8s
- Launch an EC2 with specs- t2.medium and 20gb storage
- Create an IAM role with Administrator access and attach it with the ec2 machine
########## Installations on the ec2 ###################### Run the following command for the required installations kubectl Python3-Pip eksctl awscli
- sudo apt-get update
- sudo apt install python3-pip (Install Python3-Pip)
- pip3 install awscli --upgrade --user (use Sudo if not run in the first place)
- sudo rm /usr/local/bin/kubectl (removing the Kubectl)
- https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/ (link to download Kubectl consists of 3 steps)
- sudo apt install awscli (Before running aws eks update command check awscli version. If aws cLi is not present install it with the mentioned command)
- https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html (to download eksctl)
########## Cluster creation ######################
- eksctl create cluster -f cluster.yaml
- kubectl create ns local
- kubectl apply -f vote.yaml --namespace=local
- kubectl apply -f redis.yaml --namespace=local
- kubectl apply -f db.yaml --namespace=local
- kubectl apply -f worker.yaml --namespace=local
- kubectl apply -f result.yaml --namespace=local