Giter VIP home page Giter VIP logo

k8s-flask's Introduction

How to build and deploy using eks, k8s, flask

Install prerequisities

You need to install those and login with aws cli correctly

Creating a VPC

We will use this Cloudformation template, provide by aws: https://amazon-eks.s3.us-west-2.amazonaws.com/cloudformation/2020-06-10/amazon-eks-vpc-private-subnets.yaml

What this do?

  • Create a VPC with CIDR address of 192.168.0.0/16
  • Create two public subnets with CIDR blocks of 192.168.0.0/18 and 192.168.64.0/18
  • Create two private subnets with CIDR blocks of 192.168.128.0/18 and 192.168.192.0/18

Output:

It will returns 1 security group for the vpc, 1 vpc id, 4 subnets ids

Deploy EKS cluster

using kubernetes/clusters.yaml, replace vpc id with vpc id from above, replace 4 subnets ids with 4 subnet ids from above. You need to use correct private and public subnets, respectively

What it do:

  • Create an EKS cluster named EKS-Demo-Cluster
  • In node group, we create 3 workers with t2.micro instances with 2 public workers and 1 private worker

Run this command to create the EKS Cluster

eksctl create cluster -f kubernetes/clusters.yaml

Wait for a while for the cluster be created

Deploy your application

  • Use kubernestes/deployment.yaml
  • Run kubectl apply -f deployment.yaml

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.