Code Monkey home page Code Monkey logo

eks-readme's Introduction

eks-readme

EKS-A Workshop

We will be deploying the Google Demo app to our EKS clusters.

Standard EKS deployment

Dependencies

Cluster Creation

Create a cluster (this will take 15-20 min...). The PROJECT_NAME must be unique:

eksctl create cluster --name <PROJECT_NAME> --version 1.27 --nodes=2 --node-type=t2.medium

Cluster Creation Validation and Health

eksctl get cluster --name <CLUSTER_NAME>
eksctl get nodegroup --cluster <CLUSTER_NAME>

Stacks used to create cluster

aws cloudformation list-stacks
aws cloudformation describe-stacks —-stack-name <STACK NAME>

VPC and Subnets

aws eks describe-cluster —-region us-east-1 —-name <CLUSTER_NAME>

Enable Logging

CloudWatch logging will not be enabled for the cluster. We will enable logging review the logs.

eksctl utils update-cluster-logging —-enable-types=all —-region=us-east-1 —-cluster=<CLUSTER_NAME> —-approve

Deploy Application

Dowload the application:

git clone https://github.com/GoogleCloudPlatform/microservices-demo.git

The download should create a microservices-demo directory with all of the code

Create the application:

kubectl apply -f ./microservices-demo/release/kubernetes-manifests.yaml

Wait for the pods to be ready.

kubectl get pods

After a few minutes, you should see the Pods in a Running state:

   NAME                                     READY   STATUS    RESTARTS   AGE
   adservice-76bdd69666-ckc5j               1/1     Running   0          2m58s
   cartservice-66d497c6b7-dp5jr             1/1     Running   0          2m59s
   checkoutservice-666c784bd6-4jd22         1/1     Running   0          3m1s
   currencyservice-5d5d496984-4jmd7         1/1     Running   0          2m59s
   emailservice-667457d9d6-75jcq            1/1     Running   0          3m2s
   frontend-6b8d69b9fb-wjqdg                1/1     Running   0          3m1s
   loadgenerator-665b5cd444-gwqdq           1/1     Running   0          3m
   paymentservice-68596d6dd6-bf6bv          1/1     Running   0          3m
   productcatalogservice-557d474574-888kr   1/1     Running   0          3m
   recommendationservice-69c56b74d4-7z8r5   1/1     Running   0          3m1s
   redis-cart-5f59546cdd-5jnqf              1/1     Running   0          2m58s
   shippingservice-6ccc89f8fd-v686r         1/1     Running   0          2m58s

Access the web frontend in a browser using the frontend's external IP

   kubectl get service frontend-external | awk '{print $4}'

Visit http://EXTERNAL_IP in a web browser to access your instance of Online Boutique.

View a list of all the microservices running

kubectl get services

View the nodes that each microservice is running in

kubectl get pods -o wide

(Optional) Logging - can view in the console

Amazon EKS control plane logging provides audit and diagnostic logs directly from the Amazon EKS control plane to CloudWatch Logs in your account.

The following cluster control plane log types are available. Each log type corresponds to a component of the Kubernetes control plane:

  • Kubernetes API server component logs: Your cluster's API server is the control plane component that exposes the Kubernetes API.
  • Audit: Audit logs provide a record of the individual users, administrators, or system components that have affected your cluster.
  • Authenticator: Authenticator logs are unique to Amazon EKS. These logs represent the control plane component that Amazon EKS uses for Kubernetes Role Based Access Control.
  • Control Manager: The controller manager manages the core control loops that are shipped with Kubernetes.
  • Scheduler: The scheduler component manages when and where to run pods in your cluster.

Checking Logs

Describe the log group for the cluster:

aws logs describe-log-groups --log-group-name-prefix /aws/eks/<CLUSTER_NAME>/cluster

Describe the log streams for the cluster:

aws logs describe-log-streams --log-group-name /aws/eks/<CLUSTER_NAME>/cluster

Get the log events in the log streams on the cluster:

aws logs get-log-events --log-group-name /aws/eks/<CLUSTER_NAME>/cluster --log-stream-name <LOG_STREAM_NAME>

(Optional) Delete Cluster

eksctl delete cluster --name <PROJECT_ID>

eks-readme's People

Contributors

noblet83 avatar

Watchers

 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.