Giter VIP home page Giter VIP logo

kubernate-eks's Introduction

*Install aws cli
   -https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html

*Install kubectl cli
   -https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html


*Login to aws region
    1-aws ecr get-login-password --region us-east-1 //COPY TOKEN
    2-sudo  docker login -u AWS -p TOKEN https://xxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com
    
 *Connect to EKS cluster
   -Make connection
     aws eks --region REGION-CODE update-kubeconfig --name CLUSTER-NAME
   -Test your configuration.
     kubectl get svc
   -You should see .kube folder in home folder 


*Push docker image to ECR
  -Create repository
     -https://console.aws.amazon.com/ecr/create-repository?region=us-east-1
  -Create tag
     -docker tag microserivce:latest xxxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/microservice:latest
  -Push image
     -docker push xxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/microservice:latest


*Create EKS cluster with required configuration.
  -https://console.aws.amazon.com/eks/home?region=us-east-1#/cluster-create
  -open cluster page and create node with required configuration



*Most used kubectl command
  -kubectl get pods                  //get pods 
  -kubectl get deploy                //get deployments
  -kubectl get service               //get services
  -kubectl get replicaset            //get replicaset 
  -kubectl get all                   //get all
  -kubectl create -f deployment.yml  //create pod and deploy microservice 
  -kubectl apply -f deployment.yml  //Apply changes in pod
  -kubectl logs PODNAME        //get pod logs
  -kubectl describe pod PODNAME        //describe pod
  -kubectl describe deploy DEPLOYNAME  //describe deploy
  -kubectl describe service SERVICENAME  //describe service
  -kubectl get node                      //get nodes in the cluster
  -kubectl delete pod PODNAME        //delete pod
  -kubectl delete deploy DEPLOYNAME  //delete deploy 
  
  
  *Setup EKS admin dashboard 
  
   -run the following comands in terminal
     kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.6/components.yaml   //Deploy the Metrics Server
     kubectl get deployment metrics-server -n kube-system //Verify that the metrics-server deployment is running 
     kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml //Deploy the dashboard
     kubectl apply -f eks-admin-service-account.yml   //eks-admin-service-account.yml found in git repository 
     kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}')  //copy token from output

   -open in the browser   
     http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#!/login
     
     
   -Choose Token, paste the copyed token from the previous command into the Token field, and choose SIGN IN.

kubernate-eks's People

Contributors

alialrabi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.