GithubHelp home page GithubHelp logo

terraformapp's Introduction

Terraform GKE Private cluster with end-to-end setup of all components

Complete e2e setup for GKE private cluster with jumphost and all other components setup

The Setup

  • CLUSTER:
    • Create GKE cluster with 2 modules google_container_cluster and google_container_node_pool.
    • Adding lifecycle parameter enable changing node_count, node_config and autoscalling parameters witout triggering cluster destroy-recreate.
    • Adding private_cluster_config and related fields to make this a private cluster (enable_private_endpoint = true -> to make end-point also private)
  • NETWORK:
    • Create custom VPC with subnet and secondary ranges (for Pods and service).
    • Firewall with SSH rule (with tag = ssh)
    • Adding Cloud NAT and cloud_router for nodes to connect to internet to download images
  • COMPUTE:
    • Create jump host with ready-to-ssh from terrafom ran host
    • Kubectl binaries installed
    • gcloud service account enabled and configured
    • k8s cluster config enable for accessing cluster from jumphost
    • Passing sample k8s app setup files (pods.yaml and service.yaml) into the jump-host using file provisioner
  • Sampleapp:
    • Contains sample k8s deployment and service yaml files to create and expose a sample app on LB port 8080 (can be accessede on http://<LB_PublicIP:8080>)

The Architecture

The Architecture Flow

P.S. NOTE:

  1. Tested and working with terraform version ~> 12.20 and google-provider version ~> 3.10
  2. Few Vars have been left blank ("") and need to filed before terraform apply

terraformapp's People

Contributors

yogeshvk1209 avatar hari326-git 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.