Giter Site home page Giter Site logo

microservices-nodejs-auction's Introduction

Microservices with Node JS and React Exercise

Development

  • Run Kubernetes cluster inside Google Cloud or on Docker Desktop
  • Use Ingress Inginx Controller to access the cluster
  • Streamline development code updates using Skaffold

Switch between local K8s and GKE

For running the cluster n Docker Desktop:

  1. Images in services must point to docker hub
  2. Skaffold images must be set to docker hub
  3. Set build.local to push: false in skaffold.yaml
  4. Ingress service host must be set a domain pointing to 127.0.0.1 by tweaked hosts config

For running on GKE

  1. Images must be set to us.gcr.io/ticketings/
  2. Skaffold setting googleCloudBuild should be set to projectId: ticketings
  3. Ingress service host should be set to ticketings.gc

Setup k8s cluster

  1. Setup Ingress controller
  2. Add JWT secret in the cluster kubectl create secret generic jwt-secret --from-literal JWT_KEY=asdf

Connect kubectl to GKE from local machine

  1. Go to Kubernetes Engine page and select the cluster.
  2. Press on >_Connect to open a cloud console.
  3. Copy gcloud authorization command to local terminal. It will swtich local kubectl context to gcloud, e.g. gcloud container clusters get-credentials ticketing-dev --zone europe-west3-a --project ticketings.
  4. Troubleshoot: Make sure gcloud is logged in.

Setup a new service

  1. Create a source folder
  2. Build an image
  3. Create a k8s deployment and service
  4. Setup routing in the ingress service
  5. Update skaffold config

microservices-nodejs-auction's People

Contributors

ridmitri avatar renovate[bot] 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.