GithubHelp home page GithubHelp logo

ragul28 / terraform-mulitcloud-k8s Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 53 KB

All-in-one repository for multi-cloud k8s cluster provisioning using Terraform. Supports GKE, EKS & AKS.

Makefile 3.27% HCL 96.73%
aks aws azure eks gcp gke kubernetes provision-k8s-cluster terraform tf-module

terraform-mulitcloud-k8s's Introduction

Multi cloud k8s provisioning using terraform

Provision k8s cluster in all there major cloud providers using single terraform repository.

  • AWS EKS
  • Azure AKS
  • GCP GKE

Usage

EKS

  • Make sure AWS credentials are configured using aws-cli.

  • Fill with necessary variables in terraform.tfvars file.

  • Run the terraform with necessary variables.

    cd aws/
    terraform init
    terraform apply
    
  • To append kubeconfig file default path

    aws eks update-kubeconfig --name <CLUSTER_NAME>
    
  • To estimate cost using infracost.

    make infracost

AKS

  • Authenticating azure provider using the Azure CLI

    az login
    az account set --subscription="SUBSCRIPTION_ID"
    
  • Clone project & fill the terraform variables in terraform.tfvars.

    cd azure/
    cp terraform.tfvars.sample terraform.tfvars
    terraform init
    terraform apply
    
  • Get kubeconfig using az or export

    az aks get-credentials --resource-group $RESOURCE_GROUP --name $AKS_CLUSTER_NAME
    

    or

    echo "$(terraform output kube_config)" > aks-kube-confg.yml
    export KUBECONFIG="$PWD/aks-kube-confg.yml"
    

GKE

  • Install gcloud cli & auth with gcp account
  • Add your account to the app default credentials.
    gcloud auth application-default login
    
  • Update the tfvars file & init terrform. To enable regonal cluster comment zone in terraform.tfvars.
    cd gcp
    cp terraform.tfvars.sample terraform.tfvars
    terraform init
    terraform apply
    

terraform-mulitcloud-k8s's People

Contributors

ragul28 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.