Skip to content

DrCoffee84/kubernetes-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

kubernetes-workshop

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 

Docker

Create and run

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

Create network (to test app)

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 

Push image

docker push ${USER}/simple-express-mongo-app:latest

Kubernetes

alias

vi ~/.bashrc
alias k='kubectl'
source ~/.bashrc # or exec bash

Play basic with Kubernetes

see this documentation here

Deploy simple-express-mongo app

see this documentation here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published