An example of development and production flows of full stack application run on Kubernetes
This repo includes two projects:
- Client app based on CRA (https://github.com/facebook/create-react-app)
- Server app based on NestJS (https://nestjs.com/)
Each project includes development and production Dockerfiles.
Inside infra/k8s
you can find kubernetes configurations of client, server and postgres, for development and production, built to be used with kustomize.
skaffold.yaml
contains the magic that allows us to run build-push-deploy flow both in local and production.
- Install Docker (https://docs.docker.com/get-docker/)
- Install Skaffold (https://skaffold.dev/docs/install/)
- Install Kustomize (https://kustomize.io/)
skaffold dev --profile=development
will run the app in development mode using the current kubectl contextskaffold run --profile=production --default-repo=gcr.io/$(gcloud config get-value project)
will deploy production to the current kubectl context