Giter Club home page Giter Club logo

poc-dmz-nginx-aws-k8s's Introduction

INTRO


This is just a test or POC using a combination of tools like: AWK, K8s and Terraform.

The code will deploy a managed K8s in AWS and create two nginx deployment: one for private connections and one for public connections.

Public Nginx's deployment will be depend on the staus of the Private nginx.

SETUP


  • 2 highly available nginx service in cluster on Kubernetes.
  • The first nginx will be reachable from the public internet (public) and the second one just be reachable inside the cluster (private).
  • A new release of the ngnix will trigger the private to deploy first and public to deploy after.
  • Deployment will always be Private -> Public.

STEPS


  1. Install AWS CLI "https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html".
  2. Create a terraform user from the AWS console with AccessKey auth only.
  3. Create new Security Credential from the account in AWS. Take Note of them.
  4. Use them to run "aws configure" from the AWS CLI.
  5. Create a first S3 bucket using AWS CLI. This will be used by terraform to preserve the remote state. aws s3api create-bucket --bucket "my-terraform-bucket-alef" --region "eu-west-1" --create-bucket-configuration LocationConstraint=eu-west-1
  6. Go in folder "terraform_infrastructure" and run "terraform apply" -> This will create an example of the kubeconfig file in the terraform's folder. You can use it to configure kubectl in another shell.
  7. Go in folder "terraform_k8s_config" and run "terraform apply"

In case of name conflict issues. change the "name_prefix" in the variable.tf for "terraform_infrastructure".

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.