https://miro.com/app/board/o9J_lq0-Tnw=/?invite_link_id=215554683020
Commands to copy-paste:
Verify docker installations with command run
docker run --rm hello-world
Verify kubernetes installations with kubectl commands
kubectl cluster-info
kubectl get nodes
kubectl config view
Run a instance of mongodb in container
docker run --rm -p 27017:27017 --name mongo-docker mongo
Verify nodeJS installation and test application
cd simple-express-mongo-app
node -v
npm -v
npm install
Start and test aplication
npm start
npm test
# Use another config file
export NODE_ENV=localhost
USER=dboullon
docker build . -t ${USER}/simple-express-mongo-app
# run image
docker run -p 3000:3000 --rm --name simple-express-mongo-docker dboullon/simple-express-mongo-app
## don't work until the network had set
docker network create simple-express-mongo-network
docker network connect simple-express-mongo-network --alias=mongo-network mongo-docker
docker network inspect simple-express-mongo-network
docker run -itd --network=simple-express-mongo-network nginx
docker run -p 3000:3000 --rm --name simple-express-mongo-docker --env NODE_ENV=docker --network=simple-express-mongo-network dboullon/simple-express-mongo-app
docker push ${USER}/simple-express-mongo-app:latest
alias
vi ~/.bashrc
alias k='kubectl'
source ~/.bashrc # or exec bash
see this documentation here
see this documentation here