Giter Club home page Giter Club logo

neat-eks-module's Introduction

Neat EKS Module

Repository License Hits

Usage

Change the value of root/setting.tfvars to customize:

vpc_cidr = "10.0.0.0/16"
azs_count = 3

enable_nat_gateway = true
...

To customize the EKS node group, modify the /root/locals.tf:

locals {
    eks_managed_node_groups = {
        first = {
            name = "${var.eks_env}-node-group-1"
            instance_types = ["t3.large"] # modify this

            min_size     = 1 # modify this
            max_size     = 3 # modify this
            desired_size = 1 # modify this

            cluster_primary_security_group_id = module.eks.cluster_primary_security_group_id
            vpc_security_group_ids            = [module.eks.node_security_group_id]
        }
    }
}

Following fields are customizable:

  • instance_types: Spec of the node (EC2)
  • min_size: Minimum node count
  • max_size: Maximum node count
  • desired_size: Desired node count that will be maintained in default state.

Modifying other fields are not recommended.

After customizing, modify the root/terraform.tf to save state in your S3 Bucket.

terraform {
  backend "s3" {
    bucket = "synoti21-eks" # Your Bucket
    key    = "eks/root" # Key in your Bucket
    region = "ap-northeast-2" # Region of your Bucket
  }

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
  }
  required_version = "~> 1.3"
}

You should set your context to your AWS account, to grant Terraform to access your S3.

For example, set the context by using AWS CLI.

aws configure

Finally, run the following command:

cd root
terraform init
terraform apply -var-file="settings.tfvars"

The following resources will be created:

  • VPC
  • VPC Endpoint (S3, DynamoDB Gateway)
  • VPC Peering (optional)
  • EKS

neat-eks-module's People

Contributors

synoti21 avatar

Stargazers

 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.