- Create a new directory
- npm init -y
- install dependencies (e.g. npm install typescript ts-node-dev express @types/express)
- tsc --init (if working with typescript)
- Set up a start script within package.json
- "start": "nodemon index.js" if on js
- "start": "ts-node-dev src/index.ts" if on ts
- Setup Dockerfile & .dockerignore
- Ensure docker can successfully build and run the image
- Setup k8s infra (basic deployment and clusterip)
- Setup skaffold config to copy any code changes to code files to the correct container and rebuild infrastructure on k8s file changes
- Test infra with 'skaffold dev'
- Setup a basic request/response endpoint in the microservice for testing
- Create either a nodeport(localdev) or an ingress controller for access from outside the cluster(kubernetes.github.io/ingress-nginx)
- If using an ingress controller, make sure to change your /etc/hosts file for local development
- Chrome will probably stop access to the site locally due to the nginx self signed certificate. To get around that in development, click anywhere in the chrome webpage and type 'thisisunsafe' to be let through