Code Monkey home page Code Monkey logo

gke-base-infra's Introduction

GKE - base infrastructure

Purpose

This repository is needed for sample app deployments in GCP, that can be found here: gke-sample-app-deployment.

Setup

All of the code is based on official HashiCorp tutorial. You can use it to deploy: vpc & subnet, GKE cluster, GCR.

To do so:

  1. Clone this repository.
  2. Install Terraform (version: 0.15+).
  3. Install Google Cloud SDK
  4. Log in to your GCP project from command line (gcloud init)
  5. [Optional] Create terraform.auto.tfvars - add variable values for region, zone, project_id (you will be prompted to provide them if you won't create this file).
  6. Change backend configuration in terraform_config.tf - use your own Terraform Organisation and Workspace - if you don't want to use Terraform Cloud - change backend type to local. (if you do so, you will also have to amend code within gke-sample-app-deployment repository to get information about GKE clusters from different location than shared remote backend)

If you will use Terraform Cloud, open your terminal and log in:

terraform login

While creating namespace: make sure to set execution mode to local and select CLI-driven runs.

  1. Inside gke-infra/ folder run:
terraform init
terrafom plan
terrafom apply
  1. Approve terraform apply and wait for around 10 mins for cluster to deploy.

  2. Remember to remove your resources when you no longer need them with:

terraform destroy

This infrastructure will generate costs, check GCP documentation to learn more.

This infrastructure is only a demo, it does not contain production-ready environment. Currently GKE cluster is deployed in single zone.

gke-base-infra's People

Contributors

ksiedl avatar ksiedlarek avatar

Stargazers

Daniel Suckow avatar

Watchers

James Cloos avatar  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.