Giter VIP home page Giter VIP logo

microfrontends-k8s's Introduction

micro-frontend-K8s

A kubernetes implementation of this microfronts example: https://github.com/richgo/micro-frontend-basic. Using NextJs zones and federated Apollo GraphQL

Architcture

The application we are building is comprised of a Nexts Js app, 2x Next Js zone apps, an Apollo Gateway and 4x Apollo servers (federated). It looks like this:

image

The principles of this architecture are to be decoupled both horizontally and vertically, enabling teams to align around product areas whilst maintaining consistency.

Pre-reqs

  1. K8s running under Docker desktop https://www.docker.com/products/docker-desktop
  2. Helm 3 https://helm.sh/docs/intro/install/
  3. Ingress https://kubernetes.github.io/ingress-nginx/deploy/
  4. Google Skaffold ( > 1.18 for module support) https://skaffold.dev/docs/install/
  5. DNS (dnsmasq or hosts file will work) 127.0.0.1 w.fakefurniture.local graph.fakefurniture.local p.fakefurniture.local a.fakefurtniture.local
  6. Node https://nodejs.org/en/download/

Build & Deploy

skaffold dev

That's it! Docker Builkit will now build 8 containers, Helm will deploy them and Skaffold will watch for file changes and give you hot-reloading (build/deploy) whenever you change code.

Test

You should now see a rather rubbish looking website here:

http://w.fakefurniture.local

and graph QL playground here:

http://graph.fakefurniture.local

individual next zone apps can be found here:

http://p.fakefurniture.local http://a.fakefurtniture.local

microfrontends-k8s's People

Stargazers

Luiz Gustavo avatar Sanjin Becirovic avatar integrate-your-mind avatar Anatoly  avatar Greg Denys avatar

Watchers

Rich James 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.