Giter Site home page Giter Site logo

kops_lab's Introduction

Lab

Requirements

terraform
kubectl
kops
jq
make
awscliv2

How to Use it

Step 1: Build the docker image and push to docker hub

make build

Step 2: Build the Kubernetes Cluster (with Kops)

make build_infra

Step 3: Configure Nginx Ingress Controller + NLB

make config_ingress

Step 4: Deploy the Application to Kubernetes cluster

make deploy_app

note: default environment variable AWS_PROFILE is aws-cert1, in order to deploy your own stack, make sure to adjust this environment variable based on your local environment settings

Acceptance criteria

  • When I visit http://your-link, I should receive a successful response .
  • I can spin up my own stack with provided instructions, infrastructure as code and automation.
  • README file, containing assumptions, design considerations and tradeoffs.

Design Considerations

  • Standard scripting using Makefile and bash that will permit the easy integration to CI/CD Pipelines
  • Kubernetes Kops was chosen as underlying target infraestructure
  • Terraform was used for the deployment of application into Kubernetes
  • Codebase is located in src folder
  • Scripts are located in scripts folder
  • Terraform files are located in tf folder
  • SSL Certificate was not included

Tradeoffs

  • Due to the use of Terraform for the deployment of application into Kubernetes 1.22, it was not possible to create the Ingress object using kubernetes_ingress terraform resource, instead I had to opt for the deployment of ingress using manifest file.
Due to ~~~ https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122  ~~~


  Terraform throws the error:
  Error: Failed to create Ingress 'helloworld/helloworld' because: the server could not find the requested resource (post ingresses.extensions) 

Assumptions

  • CI/CD pipeline will have the right IAM role permissions to be able to create the infraestructure in AWS using Kops
  • Region is ap-southeast-2
  • Hosted Zone is already created in Route53

kops_lab's People

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.